home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / Interfaces&Libraries / Universal / Interfaces / CIncludes / OCEAuthDir.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-08-17  |  170.6 KB  |  4,446 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        OCEAuthDir.h
  3.  
  4.      Contains:    Apple Open Collaboration Environment Authentication Interfaces.
  5.  
  6.      Version:    Technology:    AOCE Toolbox 1.02
  7.                  Release:    Universal Interfaces 3.2
  8.  
  9.      Copyright:    © 1994-1998 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __OCEAUTHDIR__
  18. #define __OCEAUTHDIR__
  19.  
  20. #ifndef __APPLETALK__
  21. #include <AppleTalk.h>
  22. #endif
  23. #ifndef __FILES__
  24. #include <Files.h>
  25. #endif
  26. #ifndef __OSUTILS__
  27. #include <OSUtils.h>
  28. #endif
  29. #ifndef __MACTYPES__
  30. #include <MacTypes.h>
  31. #endif
  32.  
  33. #ifndef __OCE__
  34. #include <OCE.h>
  35. #endif
  36.  
  37.  
  38.  
  39. #if PRAGMA_ONCE
  40. #pragma once
  41. #endif
  42.  
  43. #ifdef __cplusplus
  44. extern "C" {
  45. #endif
  46.  
  47. #if PRAGMA_IMPORT
  48. #pragma import on
  49. #endif
  50.  
  51. #if PRAGMA_STRUCT_ALIGN
  52.     #pragma options align=mac68k
  53. #elif PRAGMA_STRUCT_PACKPUSH
  54.     #pragma pack(push, 2)
  55. #elif PRAGMA_STRUCT_PACK
  56.     #pragma pack(2)
  57. #endif
  58.  
  59. /*****************************************************************************/
  60.  
  61. enum {
  62.     kRC4KeySizeInBytes            = 8,                            /* size of an RC4 key */
  63.     kRefNumUnknown                = 0
  64. };
  65.  
  66.  
  67. enum {
  68.     kEnumDistinguishedNameBit    = 0,
  69.     kEnumAliasBit                = 1,
  70.     kEnumPseudonymBit            = 2,
  71.     kEnumDNodeBit                = 3,
  72.     kEnumInvisibleBit            = 4
  73. };
  74.  
  75. /* Values of DirEnumChoices */
  76.  
  77. enum {
  78.     kEnumDistinguishedNameMask    = 1L << kEnumDistinguishedNameBit,
  79.     kEnumAliasMask                = 1L << kEnumAliasBit,
  80.     kEnumPseudonymMask            = 1L << kEnumPseudonymBit,
  81.     kEnumDNodeMask                = 1L << kEnumDNodeBit,
  82.     kEnumInvisibleMask            = 1L << kEnumInvisibleBit,
  83.     kEnumAllMask                = (kEnumDistinguishedNameMask | kEnumAliasMask | kEnumPseudonymMask | kEnumDNodeMask | kEnumInvisibleMask)
  84. };
  85.  
  86. typedef unsigned long                     DirEnumChoices;
  87. /* Values of DirSortOption */
  88.  
  89. enum {
  90.     kSortByName                    = 0,
  91.     kSortByType                    = 1
  92. };
  93.  
  94.  
  95. /* Values of DirSortDirection */
  96.  
  97. enum {
  98.     kSortForwards                = 0,
  99.     kSortBackwards                = 1
  100. };
  101.  
  102. /* Values of DirMatchWith */
  103.  
  104. enum {
  105.     kMatchAll                    = 0,
  106.     kExactMatch                    = 1,
  107.     kBeginsWith                    = 2,
  108.     kEndingWith                    = 3,
  109.     kContaining                    = 4
  110. };
  111.  
  112. typedef unsigned char                     DirMatchWith;
  113.  
  114. enum {
  115.     kCurrentOCESortVersion        = 1
  116. };
  117.  
  118. /*  Access controls are implemented on three levels:
  119.  *      DNode, Record, and Attribute Type levels
  120.  *  Some access control bits apply to the container itself, and some apply to its contents.
  121.  *
  122.  *  The Catalog Toolbox supports six functions.  These calls are:
  123.  *  DSGetDNodeAccessControl : to get Access Controls at the DNode level
  124.  *    DSGetRecordAccessControl  : to get Access Controls at the record level
  125.  *  DSGetAttributeAccessControl : to get Access Privileges at the attribute type level
  126.  * 
  127.  *  The GetXXXAccessControl calls will return access control masks for various categories
  128.  *  of users.  Please refer to the access control document for a description of the
  129.  *  categories of users.  In general these are:
  130.  *      ThisRecordOwner         - means the identity of the record itself
  131.  *      Friends                  - means any one of the assigned friends for the record
  132.  *      AuthenticatedInDNode     - means any valid user that is an authenticated entity
  133.  *          in the DNode in which this record is located
  134.  *      AuthenticatedInDirectory - means any valid authenticated catalog user
  135.  *      Guest                      - means an unauthenticated user.
  136.  *  Bit masks for various permitted access controls are defined below.
  137.  *
  138.  *  GetXXXAccessControl calls will return access control masks for various categories of
  139.  *  users for this record. In addition they also return the level of access controls
  140.  *  that the user (who is making the GetXXXAccessControl call) has for the DNode,
  141.  *  record, or attribute type.
  142.  *
  143.  *  For records, the access control granted will be minimum of the DNode access
  144.  *  control and record access control masks.  For example, to add an attribute type to a
  145.  *  record, a user must have access control kCreateAttributeTypes at the record and
  146.  *  DNode levels.  Similarly, at the attribute type level, access controls will be the
  147.  *  minimum of the DNode, record, and attribute type access controls.
  148.  *
  149.  *  
  150.  */
  151. /* access privileges bit numbers */
  152.  
  153. enum {
  154.     kSeeBit                        = 0,
  155.     kAddBit                        = 1,
  156.     kDeleteBit                    = 2,
  157.     kChangeBit                    = 3,
  158.     kRenameBit                    = 4,
  159.     kChangePrivsBit                = 5,
  160.     kSeeFoldersBit                = 6
  161. };
  162.  
  163. /* Values of AccessMask */
  164.  
  165. enum {
  166.     kSeeMask                    = (1L << kSeeBit),
  167.     kAddMask                    = (1L << kAddBit),
  168.     kDeleteMask                    = (1L << kDeleteBit),
  169.     kChangeMask                    = (1L << kChangeBit),
  170.     kRenameMask                    = (1L << kRenameBit),
  171.     kChangePrivsMask            = (1L << kChangePrivsBit),
  172.     kSeeFoldersMask                = (1L << kSeeFoldersBit)
  173. };
  174.  
  175.  
  176. enum {
  177.     kAllPrivs                    = (kSeeMask + kAddMask + kDeleteMask + kChangeMask + kRenameMask + kChangePrivsMask + kSeeFoldersMask),
  178.     kNoPrivs                    = 0
  179. };
  180.  
  181. /*
  182.  
  183. kSupportsDNodeNumberBit:
  184. If this bit is set, a DNode can be referenced using DNodeNumbers. 
  185. RecordLocationInfo can be specified using DNodeNumber and PathName component can be nil. 
  186. If this bit is not set, a DNode can be referenced only by PathName to the DNode. In the 
  187. later case DNodeNumber component inside record location info must be set to zero.
  188.  
  189. kSupportsRecordCreationIDBit:
  190. If this bit is set, a record can be referenced by specifying CreationID 
  191. in most catalog manager calls. If this bit is not set recordName and recordType are 
  192. required in the recordID specification for all catalog manager calls.
  193.  
  194. kSupportsAttributeCreationIDBit:
  195. If this bit is set, an attribute value can be obtained by specifying it's 
  196. CreationID in Lookup call staring point and also can be used in operations 
  197. like DeleteAttributeValue and ChangeAttributeValue an Attribute can be 
  198. specified by AttributeType and CreationID.
  199.  
  200. *************************************************************************
  201. Implicit assumption with creationID's and dNodeNumbers are, when supported
  202. they are persistent and will preserved across boots and life of the system.
  203. *************************************************************************
  204.  
  205. Following three bits are for determining the sort order in enumeration.
  206. kSupportsMatchAllBit:
  207. If this bit is set, enumeration of all the records is supported
  208.  
  209. kSupportsBeginsWithBit:
  210. If this bit is set, enumeration of records matching prefix (e.g. Begin with abc)
  211. is supported
  212.  
  213. kSupportsExactMatchBit:
  214. If this bit is set, existence of a record matching exact matchNameString and recordType
  215. is supported.
  216.  
  217. kSupportsEndsWithBit:
  218. If this bit is set, enumeration of records matching suffix (e.g. end with abc)
  219. is supported.
  220.  
  221. kSupportsContainsBit:
  222. If this bit is set, enumeration of records containing a matchNameString (e.g. containing abc)
  223. is supported
  224.  
  225.  
  226. Implicit assumption in all these is, a record type can be specified either as one of the above or
  227. a type list(more then one) to match exact type.
  228. The Following four bits will indicate sort ordering in enumeration.
  229.  
  230. kSupportsOrderedEnumerationBit:
  231. If this bit is set, Enumerated records or in some order possibly in name order.
  232.  
  233. kCanSupportNameOrderBit:
  234. If this is set, catalog will support sortbyName option in Enumerate.
  235.  
  236. kCanSupportTypeOrderBit:
  237. If this bit is set, catalog will support sortbyType option in enumearte.
  238.  
  239. kSupportSortBackwardsBit:
  240. If this bit is set, catalog supports backward sorting.
  241.  
  242. kSupportIndexRatioBit:
  243. If this bit is set, it indicates that enumeration will return approximate position
  244. of a record (percentile) among all records.
  245.  
  246. kSupportsEnumerationContinueBit:
  247. If this bit is set, catalog supports enumeration continue.
  248.  
  249. kSupportsLookupContinueBit:
  250. If this bit is set, catalog supports lookup continue.
  251.  
  252. kSupportsEnumerateAttributeTypeContinueBit:
  253. If this bit is set, catalog supports EnumerateAttributeType continue.
  254.  
  255. kSupportsEnumeratePseudonymContinueBit:
  256. If this bit is set, catalog supports EnumeratePseudonym continue.
  257.  
  258. kSupportsAliasesBit:
  259. If this bit is set, catalog supports create/delte/enumerate 
  260. of Alias Records.
  261.  
  262. kSupportPseudonymBit: 
  263. If this bit is set, catalog supports create/delte/enumerate of 
  264. pseudonyms for a record.
  265.  
  266. kSupportsPartialPathNameBit:
  267. If this bit is set, catalog nodes can be specified using DNodeNumber of a 
  268. intermediate DNode and a partial name starting from that DNode to the intended 
  269. DNode.
  270.  
  271. kSupportsAuthenticationBit:
  272. If this bit is set, catalog supports authentication manager calls.
  273.  
  274. kSupportsProxiesBit:
  275. If this bit is set, catalog supports proxy related calls in authentication manager. 
  276.  
  277. kSupportsFindRecordBit:
  278. If this bit is set, catalog supports find record call.
  279.  
  280. Bits and corresponding masks are as defined below.
  281. */
  282.  
  283. enum {
  284.     kSupportsDNodeNumberBit        = 0,
  285.     kSupportsRecordCreationIDBit = 1,
  286.     kSupportsAttributeCreationIDBit = 2,
  287.     kSupportsMatchAllBit        = 3,
  288.     kSupportsBeginsWithBit        = 4,
  289.     kSupportsExactMatchBit        = 5,
  290.     kSupportsEndsWithBit        = 6,
  291.     kSupportsContainsBit        = 7,
  292.     kSupportsOrderedEnumerationBit = 8,
  293.     kCanSupportNameOrderBit        = 9,
  294.     kCanSupportTypeOrderBit        = 10,
  295.     kSupportSortBackwardsBit    = 11,
  296.     kSupportIndexRatioBit        = 12,
  297.     kSupportsEnumerationContinueBit = 13,
  298.     kSupportsLookupContinueBit    = 14,
  299.     kSupportsEnumerateAttributeTypeContinueBit = 15,
  300.     kSupportsEnumeratePseudonymContinueBit = 16,
  301.     kSupportsAliasesBit            = 17,
  302.     kSupportsPseudonymsBit        = 18,
  303.     kSupportsPartialPathNamesBit = 19,
  304.     kSupportsAuthenticationBit    = 20,
  305.     kSupportsProxiesBit            = 21,
  306.     kSupportsFindRecordBit        = 22
  307. };
  308.  
  309. /* values of DirGestalt */
  310.  
  311. enum {
  312.     kSupportsDNodeNumberMask    = 1L << kSupportsDNodeNumberBit,
  313.     kSupportsRecordCreationIDMask = 1L << kSupportsRecordCreationIDBit,
  314.     kSupportsAttributeCreationIDMask = 1L << kSupportsAttributeCreationIDBit,
  315.     kSupportsMatchAllMask        = 1L << kSupportsMatchAllBit,
  316.     kSupportsBeginsWithMask        = 1L << kSupportsBeginsWithBit,
  317.     kSupportsExactMatchMask        = 1L << kSupportsExactMatchBit,
  318.     kSupportsEndsWithMask        = 1L << kSupportsEndsWithBit,
  319.     kSupportsContainsMask        = 1L << kSupportsContainsBit,
  320.     kSupportsOrderedEnumerationMask = 1L << kSupportsOrderedEnumerationBit,
  321.     kCanSupportNameOrderMask    = 1L << kCanSupportNameOrderBit,
  322.     kCanSupportTypeOrderMask    = 1L << kCanSupportTypeOrderBit,
  323.     kSupportSortBackwardsMask    = 1L << kSupportSortBackwardsBit,
  324.     kSupportIndexRatioMask        = 1L << kSupportIndexRatioBit,
  325.     kSupportsEnumerationContinueMask = 1L << kSupportsEnumerationContinueBit,
  326.     kSupportsLookupContinueMask    = 1L << kSupportsLookupContinueBit,
  327.     kSupportsEnumerateAttributeTypeContinueMask = 1L << kSupportsEnumerateAttributeTypeContinueBit,
  328.     kSupportsEnumeratePseudonymContinueMask = 1L << kSupportsEnumeratePseudonymContinueBit,
  329.     kSupportsAliasesMask        = 1L << kSupportsAliasesBit,
  330.     kSupportsPseudonymsMask        = 1L << kSupportsPseudonymsBit,
  331.     kSupportsPartialPathNamesMask = 1L << kSupportsPartialPathNamesBit,
  332.     kSupportsAuthenticationMask    = 1L << kSupportsAuthenticationBit,
  333.     kSupportsProxiesMask        = 1L << kSupportsProxiesBit,
  334.     kSupportsFindRecordMask        = 1L << kSupportsFindRecordBit
  335. };
  336.  
  337.  
  338. /* Values of AuthLocalIdentityOp */
  339.  
  340. enum {
  341.     kAuthLockLocalIdentityOp    = 1,
  342.     kAuthUnlockLocalIdentityOp    = 2,
  343.     kAuthLocalIdentityNameChangeOp = 3
  344. };
  345.  
  346. /* Values of AuthLocalIdentityLockAction */
  347.  
  348. enum {
  349.     kAuthLockPending            = 1,
  350.     kAuthLockWillBeDone            = 2
  351. };
  352.  
  353.  
  354. /* Values of AuthNotifications */
  355.  
  356. enum {
  357.     kNotifyLockBit                = 0,
  358.     kNotifyUnlockBit            = 1,
  359.     kNotifyNameChangeBit        = 2
  360. };
  361.  
  362.  
  363. enum {
  364.     kNotifyLockMask                = 1L << kNotifyLockBit,
  365.     kNotifyUnlockMask            = 1L << kNotifyUnlockBit,
  366.     kNotifyNameChangeMask        = 1L << kNotifyNameChangeBit
  367. };
  368.  
  369.  
  370. enum {
  371.     kPersonalDirectoryFileCreator = FOUR_CHAR_CODE('kl03'),
  372.     kPersonalDirectoryFileType    = FOUR_CHAR_CODE('pabt'),
  373.     kBusinessCardFileType        = FOUR_CHAR_CODE('bust'),
  374.     kDirectoryFileType            = FOUR_CHAR_CODE('dirt'),
  375.     kDNodeFileType                = FOUR_CHAR_CODE('dnod'),
  376.     kDirsRootFileType            = FOUR_CHAR_CODE('drtt'),
  377.     kRecordFileType                = FOUR_CHAR_CODE('rcrd')
  378. };
  379.  
  380. typedef unsigned short                     DirSortOption;
  381. typedef unsigned short                     DirSortDirection;
  382. typedef unsigned long                     AccessMask;
  383. typedef unsigned long                     DirGestalt;
  384. typedef unsigned long                     AuthLocalIdentityOp;
  385. typedef unsigned long                     AuthLocalIdentityLockAction;
  386. typedef unsigned long                     AuthNotifications;
  387.  
  388. struct DNodeID {
  389.     DNodeNum                         dNodeNumber;                /* dNodenumber  */
  390.     long                             reserved1;
  391.     RStringPtr                         name;
  392.     long                             reserved2;
  393. };
  394. typedef struct DNodeID                    DNodeID;
  395.  
  396. struct DirEnumSpec {
  397.     DirEnumChoices                     enumFlag;
  398.     unsigned short                     indexRatio;                    /* Approx Record Position between 1 and 100 If supported, 0 If not supported */
  399.     union {
  400.         LocalRecordID                     recordIdentifier;
  401.         DNodeID                         dNodeIdentifier;
  402.     }                                 u;
  403. };
  404. typedef struct DirEnumSpec                DirEnumSpec;
  405.  
  406. struct DirMetaInfo {
  407.     unsigned long                     info[4];
  408. };
  409. typedef struct DirMetaInfo                DirMetaInfo;
  410.  
  411. struct SLRV {
  412.     ScriptCode                         script;                        /*   Script code in which entries are sorted */
  413.     short                             language;                    /*   Language code in which entries are sorted */
  414.     short                             regionCode;                    /*   Region code in which entries are sorted */
  415.     short                             version;                    /*  version of oce sorting software */
  416. };
  417. typedef struct SLRV                        SLRV;
  418. /* Catalog types and operations */
  419. /* unique identifier for an identity */
  420.  
  421. typedef unsigned long                     AuthIdentity;
  422. /* Umbrella LocalIdentity */
  423. typedef AuthIdentity                     LocalIdentity;
  424. /* A DES key is 8 bytes of data */
  425.  
  426. struct DESKey {
  427.     unsigned long                     a;
  428.     unsigned long                     b;
  429. };
  430. typedef struct DESKey                    DESKey;
  431.  
  432. typedef Byte                             RC4Key[8];
  433. typedef unsigned long                     AuthKeyType;
  434. /* key type followed by its data */
  435.  
  436. struct AuthKey {
  437.     AuthKeyType                     keyType;
  438.     union {
  439.         DESKey                             des;
  440.         RC4Key                             rc4;
  441.     }                                 u;
  442. };
  443. typedef struct AuthKey                    AuthKey;
  444. typedef AuthKey *                        AuthKeyPtr;
  445. typedef union AuthParamBlock             AuthParamBlock;
  446.  
  447. typedef AuthParamBlock *                AuthParamBlockPtr;
  448. /* Fix parameter passing convention (#1274062) ggs, 8-7-95 */
  449. typedef CALLBACK_API( void , AuthIOCompletionProcPtr )(AuthParamBlockPtr paramBlock);
  450. /*
  451.     WARNING: AuthIOCompletionProcPtr uses register based parameters under classic 68k
  452.              and cannot be written in a high-level language without 
  453.              the help of mixed mode or assembly glue.
  454. */
  455. typedef REGISTER_UPP_TYPE(AuthIOCompletionProcPtr)                 AuthIOCompletionUPP;
  456. /*****************************************************************************
  457.  
  458.  
  459.         Authentication Manager operations 
  460.  
  461. *****************************************************************************/
  462. /*
  463. kAuthResolveCreationID:
  464. userRecord will contain the user information whose creationID has to be
  465. returned. A client must make this call when he does not know the creaitionID.
  466. The creationID must be set to nil before making the call. The server will attempt
  467. to match the recordid's in the data base which match the user name and
  468. type in the record.  Depending on number of matchings, following
  469. results will be returned.
  470. Exactly One Match : CreationID in RecordID and also in buffer (if buffer is given)
  471. totalMatches = actualMatches = 1.
  472. > 1 Match:
  473.     Buffer is Large Enough:
  474.     totalMatches = actualMatches
  475.     Buffer will contain all the CIDs, kOCEAmbiguousMatches error.
  476. > 1 Match:
  477.     Buffer is not Large Enough:
  478.     totalMatches > actualMatches
  479.     Buffer will contain all the CIDs (equal to actualMatches), daMoreDataError error.
  480. 0 Matches:
  481.  kOCENoSuchRecord error
  482. */
  483.  
  484. struct AuthResolveCreationIDPB {
  485.     void *                            qLink;
  486.     long                             reserved1;
  487.     long                             reserved2;
  488.     AuthIOCompletionUPP             ioCompletion;
  489.     OSErr                             ioResult;
  490.     unsigned long                     saveA5;
  491.     short                             reqCode;
  492.     long                             reserved[2];
  493.     AddrBlock                         serverHint;
  494.     short                             dsRefNum;
  495.     unsigned long                     callID;
  496.     AuthIdentity                     identity;
  497.     long                             gReserved1;
  498.     long                             gReserved2;
  499.     long                             gReserved3;
  500.     long                             clientData;
  501.     RecordIDPtr                     userRecord;                    /*  --> OCE name(Record) of the user */
  502.     unsigned long                     bufferLength;                /*  --> Buffer Size to hold duplicate Info */
  503.     void *                            buffer;                        /*  --> Buffer  to hold duplicate Info */
  504.     unsigned long                     totalMatches;                /* <--  Total Number of matching names found */
  505.     unsigned long                     actualMatches;                /* <--  Number of matches returned in the buffer */
  506. };
  507. typedef struct AuthResolveCreationIDPB    AuthResolveCreationIDPB;
  508. /*
  509. kAuthBindSpecificIdentity:
  510. userRecord will contain the user information whose identity has to be
  511. verified. userKey will contain the userKey. An Identity is returned which
  512. binds the key and the userRecord. The identity returned can be used in the 'identity'
  513. field in the header portion (AuthParamHeader) for authenticating the Catalog and
  514. Authentication manager calls.
  515. */
  516.  
  517. struct AuthBindSpecificIdentityPB {
  518.     void *                            qLink;
  519.     long                             reserved1;
  520.     long                             reserved2;
  521.     AuthIOCompletionUPP             ioCompletion;
  522.     OSErr                             ioResult;
  523.     unsigned long                     saveA5;
  524.     short                             reqCode;
  525.     long                             reserved[2];
  526.     AddrBlock                         serverHint;
  527.     short                             dsRefNum;
  528.     unsigned long                     callID;
  529.     AuthIdentity                     identity;
  530.     long                             gReserved1;
  531.     long                             gReserved2;
  532.     long                             gReserved3;
  533.     long                             clientData;
  534.     AuthIdentity                     userIdentity;                /* <--  binding identity */
  535.     RecordIDPtr                     userRecord;                    /*  --> OCE name(Record) of the user */
  536.     AuthKeyPtr                         userKey;                    /*  --> OCE Key for the user */
  537. };
  538. typedef struct AuthBindSpecificIdentityPB AuthBindSpecificIdentityPB;
  539. /*
  540. kAuthUnbindSpecificIdentity:
  541. This call will unbind the userRecord and key which were bind earlier.
  542. */
  543.  
  544. struct AuthUnbindSpecificIdentityPB {
  545.     void *                            qLink;
  546.     long                             reserved1;
  547.     long                             reserved2;
  548.     AuthIOCompletionUPP             ioCompletion;
  549.     OSErr                             ioResult;
  550.     unsigned long                     saveA5;
  551.     short                             reqCode;
  552.     long                             reserved[2];
  553.     AddrBlock                         serverHint;
  554.     short                             dsRefNum;
  555.     unsigned long                     callID;
  556.     AuthIdentity                     identity;
  557.     long                             gReserved1;
  558.     long                             gReserved2;
  559.     long                             gReserved3;
  560.     long                             clientData;
  561.     AuthIdentity                     userIdentity;                /*  --> identity to be deleted */
  562. };
  563. typedef struct AuthUnbindSpecificIdentityPB AuthUnbindSpecificIdentityPB;
  564.  
  565. /*
  566. kAuthGetSpecificIdentityInfo:
  567. This call will return the userRecord for the given identity. Note: key is not
  568. returned because this would compromise security.
  569. */
  570.  
  571. struct AuthGetSpecificIdentityInfoPB {
  572.     void *                            qLink;
  573.     long                             reserved1;
  574.     long                             reserved2;
  575.     AuthIOCompletionUPP             ioCompletion;
  576.     OSErr                             ioResult;
  577.     unsigned long                     saveA5;
  578.     short                             reqCode;
  579.     long                             reserved[2];
  580.     AddrBlock                         serverHint;
  581.     short                             dsRefNum;
  582.     unsigned long                     callID;
  583.     AuthIdentity                     identity;
  584.     long                             gReserved1;
  585.     long                             gReserved2;
  586.     long                             gReserved3;
  587.     long                             clientData;
  588.     AuthIdentity                     userIdentity;                /*  --> identity of initiator */
  589.     RecordIDPtr                     userRecord;                    /* <--  OCE name(Record) of the user */
  590. };
  591. typedef struct AuthGetSpecificIdentityInfoPB AuthGetSpecificIdentityInfoPB;
  592.  
  593. /*
  594. kAuthAddKey:
  595. userRecord will contain the user information whose identity has to be
  596. created. userKey will point to the key to be created. password points to
  597. an RString containing the password used to generate the key.
  598. */
  599.  
  600. struct AuthAddKeyPB {
  601.     void *                            qLink;
  602.     long                             reserved1;
  603.     long                             reserved2;
  604.     AuthIOCompletionUPP             ioCompletion;
  605.     OSErr                             ioResult;
  606.     unsigned long                     saveA5;
  607.     short                             reqCode;
  608.     long                             reserved[2];
  609.     AddrBlock                         serverHint;
  610.     short                             dsRefNum;
  611.     unsigned long                     callID;
  612.     AuthIdentity                     identity;
  613.     long                             gReserved1;
  614.     long                             gReserved2;
  615.     long                             gReserved3;
  616.     long                             clientData;
  617.     RecordIDPtr                     userRecord;                    /*  --> OCE name(Record) of the user */
  618.     AuthKeyPtr                         userKey;                    /* <--  OCE Key for the user */
  619.     RStringPtr                         password;                    /*  --> Pointer to password string */
  620. };
  621. typedef struct AuthAddKeyPB                AuthAddKeyPB;
  622. /*
  623. kAuthChangeKey:
  624. userRecord will contain the user information whose identity has to be
  625. created. userKey will point to the key to be created. password points to
  626. an RString containing the password used to generate the key.
  627. */
  628.  
  629. struct AuthChangeKeyPB {
  630.     void *                            qLink;
  631.     long                             reserved1;
  632.     long                             reserved2;
  633.     AuthIOCompletionUPP             ioCompletion;
  634.     OSErr                             ioResult;
  635.     unsigned long                     saveA5;
  636.     short                             reqCode;
  637.     long                             reserved[2];
  638.     AddrBlock                         serverHint;
  639.     short                             dsRefNum;
  640.     unsigned long                     callID;
  641.     AuthIdentity                     identity;
  642.     long                             gReserved1;
  643.     long                             gReserved2;
  644.     long                             gReserved3;
  645.     long                             clientData;
  646.     RecordIDPtr                     userRecord;                    /*  --> OCE name(Record) of the user */
  647.     AuthKeyPtr                         userKey;                    /* <--  New OCE Key for the user */
  648.     RStringPtr                         password;                    /*  -->Pointer to the new password string */
  649. };
  650. typedef struct AuthChangeKeyPB            AuthChangeKeyPB;
  651. /*
  652. AuthDeleteKey:
  653. userRecord will contain the user information whose Key has to be deleted.
  654. */
  655.  
  656. struct AuthDeleteKeyPB {
  657.     void *                            qLink;
  658.     long                             reserved1;
  659.     long                             reserved2;
  660.     AuthIOCompletionUPP             ioCompletion;
  661.     OSErr                             ioResult;
  662.     unsigned long                     saveA5;
  663.     short                             reqCode;
  664.     long                             reserved[2];
  665.     AddrBlock                         serverHint;
  666.     short                             dsRefNum;
  667.     unsigned long                     callID;
  668.     AuthIdentity                     identity;
  669.     long                             gReserved1;
  670.     long                             gReserved2;
  671.     long                             gReserved3;
  672.     long                             clientData;
  673.     RecordIDPtr                     userRecord;                    /*  --> OCE name(Record) of the user */
  674. };
  675. typedef struct AuthDeleteKeyPB            AuthDeleteKeyPB;
  676. /* AuthPasswordToKey: Converts an RString into a key. */
  677.  
  678. struct AuthPasswordToKeyPB {
  679.     void *                            qLink;
  680.     long                             reserved1;
  681.     long                             reserved2;
  682.     AuthIOCompletionUPP             ioCompletion;
  683.     OSErr                             ioResult;
  684.     unsigned long                     saveA5;
  685.     short                             reqCode;
  686.     long                             reserved[2];
  687.     AddrBlock                         serverHint;
  688.     short                             dsRefNum;
  689.     unsigned long                     callID;
  690.     AuthIdentity                     identity;
  691.     long                             gReserved1;
  692.     long                             gReserved2;
  693.     long                             gReserved3;
  694.     long                             clientData;
  695.     RecordIDPtr                     userRecord;                    /*  --> OCE name(Record) of the user */
  696.     AuthKeyPtr                         key;                        /* <--  */
  697.     RStringPtr                         password;                    /*  -->Pointer to the new password string */
  698. };
  699. typedef struct AuthPasswordToKeyPB        AuthPasswordToKeyPB;
  700. /*
  701. kAuthGetCredentials:
  702. userRecord will contain the user information whose identity has to be
  703. kMailDeletedMask. keyType (e.g. asDESKey) will indicate what type of key has to
  704. be deleted.
  705. */
  706.  
  707. struct AuthGetCredentialsPB {
  708.     void *                            qLink;
  709.     long                             reserved1;
  710.     long                             reserved2;
  711.     AuthIOCompletionUPP             ioCompletion;
  712.     OSErr                             ioResult;
  713.     unsigned long                     saveA5;
  714.     short                             reqCode;
  715.     long                             reserved[2];
  716.     AddrBlock                         serverHint;
  717.     short                             dsRefNum;
  718.     unsigned long                     callID;
  719.     AuthIdentity                     identity;
  720.     long                             gReserved1;
  721.     long                             gReserved2;
  722.     long                             gReserved3;
  723.     long                             clientData;
  724.     AuthIdentity                     userIdentity;                /*  --> identity of initiator */
  725.     RecordIDPtr                     recipient;                    /*  --> OCE name of recipient */
  726.     AuthKeyPtr                         sessionKey;                    /* <--  session key */
  727.     UTCTime                         expiry;                        /* <--> desired/actual expiry */
  728.     unsigned long                     credentialsLength;            /* <--> max/actual credentials size */
  729.     void *                            credentials;                /* <--  buffer where credentials are returned */
  730. };
  731. typedef struct AuthGetCredentialsPB        AuthGetCredentialsPB;
  732. /*
  733. AuthDecryptCredentialsPB:
  734. Changes:
  735. userKey is changed userIdentity.
  736. userRecord is changed to initiatorRecord. User must supply buffer
  737. to hold initiatorRecord.
  738. agentList has changed to agent. There wil be no call back.
  739. User must supply buffer to hold agent Record.
  740. An additional boolean parameter 'hasAgent' is included.
  741. Toolbox will set this if an 'Agent' record is found in the
  742. credentials. If RecordIDPtr is 'nil', no agent record will
  743. be copied. However user can examine 'hasAgent', If true user
  744. can reissue this call with apprpriate buffer for getting a recordID.
  745. agent has changed to intermediary.  User must supply buffer to hold 
  746. intermediary Record.  The toolbox will set 'hasIntermediary' if an
  747. 'intermediary' record is found in the credentials. 
  748. */
  749.  
  750. struct AuthDecryptCredentialsPB {
  751.     void *                            qLink;
  752.     long                             reserved1;
  753.     long                             reserved2;
  754.     AuthIOCompletionUPP             ioCompletion;
  755.     OSErr                             ioResult;
  756.     unsigned long                     saveA5;
  757.     short                             reqCode;
  758.     long                             reserved[2];
  759.     AddrBlock                         serverHint;
  760.     short                             dsRefNum;
  761.     unsigned long                     callID;
  762.     AuthIdentity                     identity;
  763.     long                             gReserved1;
  764.     long                             gReserved2;
  765.     long                             gReserved3;
  766.     long                             clientData;
  767.     AuthIdentity                     userIdentity;                /*  --> user's Identity */
  768.     RecordIDPtr                     initiatorRecord;            /* <--  OCE name of the initiator */
  769.     AuthKeyPtr                         sessionKey;                    /* <--  session key */
  770.     UTCTime                         expiry;                        /* <--  credentials expiry time */
  771.     unsigned long                     credentialsLength;            /*  --> actual credentials size */
  772.     void *                            credentials;                /*  --> credentials to be decrypted */
  773.     UTCTime                         issueTime;                    /* <--  credentials expiry time */
  774.     Boolean                         hasIntermediary;            /* <--  if true, An intermediary Record was found in credentials */
  775.     Boolean                         filler1;
  776.     RecordIDPtr                     intermediary;                /* <--  recordID of the intermediary */
  777. };
  778. typedef struct AuthDecryptCredentialsPB    AuthDecryptCredentialsPB;
  779.  
  780.  
  781. struct AuthMakeChallengePB {
  782.     void *                            qLink;
  783.     long                             reserved1;
  784.     long                             reserved2;
  785.     AuthIOCompletionUPP             ioCompletion;
  786.     OSErr                             ioResult;
  787.     unsigned long                     saveA5;
  788.     short                             reqCode;
  789.     long                             reserved[2];
  790.     AddrBlock                         serverHint;
  791.     short                             dsRefNum;
  792.     unsigned long                     callID;
  793.     AuthIdentity                     identity;
  794.     long                             gReserved1;
  795.     long                             gReserved2;
  796.     long                             gReserved3;
  797.     long                             clientData;
  798.     AuthKeyPtr                         key;                        /*  --> UnEncrypted SessionKey */
  799.     void *                            challenge;                    /* <--  Encrypted Challenge */
  800.     unsigned long                     challengeBufferLength;        /*  ->length of challenge buffer */
  801.     unsigned long                     challengeLength;            /*  <-length of Encrypted Challenge */
  802. };
  803. typedef struct AuthMakeChallengePB        AuthMakeChallengePB;
  804.  
  805. struct AuthMakeReplyPB {
  806.     void *                            qLink;
  807.     long                             reserved1;
  808.     long                             reserved2;
  809.     AuthIOCompletionUPP             ioCompletion;
  810.     OSErr                             ioResult;
  811.     unsigned long                     saveA5;
  812.     short                             reqCode;
  813.     long                             reserved[2];
  814.     AddrBlock                         serverHint;
  815.     short                             dsRefNum;
  816.     unsigned long                     callID;
  817.     AuthIdentity                     identity;
  818.     long                             gReserved1;
  819.     long                             gReserved2;
  820.     long                             gReserved3;
  821.     long                             clientData;
  822.     AuthKeyPtr                         key;                        /*  --> UnEncrypted SessionKey */
  823.     void *                            challenge;                    /*  --> Encrypted Challenge */
  824.     void *                            reply;                        /* <--  Encrypted Reply */
  825.     unsigned long                     replyBufferLength;            /*  -->length of challenge buffer */
  826.     unsigned long                     challengeLength;            /*  --> length of Encrypted Challenge */
  827.     unsigned long                     replyLength;                /* <--  length of Encrypted Reply */
  828. };
  829. typedef struct AuthMakeReplyPB            AuthMakeReplyPB;
  830.  
  831. struct AuthVerifyReplyPB {
  832.     void *                            qLink;
  833.     long                             reserved1;
  834.     long                             reserved2;
  835.     AuthIOCompletionUPP             ioCompletion;
  836.     OSErr                             ioResult;
  837.     unsigned long                     saveA5;
  838.     short                             reqCode;
  839.     long                             reserved[2];
  840.     AddrBlock                         serverHint;
  841.     short                             dsRefNum;
  842.     unsigned long                     callID;
  843.     AuthIdentity                     identity;
  844.     long                             gReserved1;
  845.     long                             gReserved2;
  846.     long                             gReserved3;
  847.     long                             clientData;
  848.     AuthKeyPtr                         key;                        /*  --> UnEncrypted SessionKey */
  849.     void *                            challenge;                    /*  --> Encrypted Challenge */
  850.     void *                            reply;                        /*  --> Encrypted Reply */
  851.     unsigned long                     challengeLength;            /*  --> length of Encrypted Challenge */
  852.     unsigned long                     replyLength;                /*  --> length of Encrypted Reply */
  853. };
  854. typedef struct AuthVerifyReplyPB        AuthVerifyReplyPB;
  855.  
  856.  
  857. /*
  858. kAuthGetUTCTime:
  859. RLI will contain a valid RLI for a cluster server.
  860. UTC(GMT) time from one of the cluster server will be returned.
  861. An 'offSet' from UTC(GMT) to Mac Local Time will also be returned.
  862. If RLI is nil Map DA is used to determine UTC(GMT).
  863. Mac Local Time = theUTCTime + theUTCOffset.
  864. */
  865.  
  866. struct AuthGetUTCTimePB {
  867.     void *                            qLink;
  868.     long                             reserved1;
  869.     long                             reserved2;
  870.     AuthIOCompletionUPP             ioCompletion;
  871.     OSErr                             ioResult;
  872.     unsigned long                     saveA5;
  873.     short                             reqCode;
  874.     long                             reserved[2];
  875.     AddrBlock                         serverHint;
  876.     short                             dsRefNum;
  877.     unsigned long                     callID;
  878.     AuthIdentity                     identity;
  879.     long                             gReserved1;
  880.     long                             gReserved2;
  881.     long                             gReserved3;
  882.     long                             clientData;
  883.     PackedRLIPtr                     pRLI;                        /*  --> packed RLI of the Node, whose server's UTC is requested */
  884.     UTCTime                         theUTCTime;                    /* <--  current UTC(GMT) Time utc seconds since 1/1/1904 */
  885.     UTCOffset                         theUTCOffset;                /* <--  offset from UTC(GMT) seconds EAST of Greenwich */
  886. };
  887. typedef struct AuthGetUTCTimePB            AuthGetUTCTimePB;
  888.  
  889. /*
  890. kAuthMakeProxy:
  891. A user represented bu the 'userIdentity' can make a proxy using this call.
  892. 'recipient' is the RecordID of the recipient whom user is requesting proxy.
  893. 'intermediary' is the RecordID of the intermediary holding proxy for the user.
  894. 'firstValid' is time at which proxy becomes valid.
  895. 'expiry' is the time at which proxy must expire.
  896. 'proxyLength' will have the length of the buffer pointed by 'proxy' as input.
  897. When the call completes, it will hold the actual length of proxy. If the
  898. call completes 'kOCEMoreData' error, client can reissue the call with the
  899. buffer size as 'proxyLength' returned.
  900. expiry is a suggestion, and may be adjusted to be earlier by the ADAP/OCE server.
  901. The 'proxy' obtained like this might be used by the 'intermediary' to obtain credentials
  902. for the server using TradeProxyForCredentials call.
  903. authDataLength and authData are intended for possible future work, but are
  904. ignored for now.
  905. */
  906.  
  907. struct AuthMakeProxyPB {
  908.     void *                            qLink;
  909.     long                             reserved1;
  910.     long                             reserved2;
  911.     AuthIOCompletionUPP             ioCompletion;
  912.     OSErr                             ioResult;
  913.     unsigned long                     saveA5;
  914.     short                             reqCode;
  915.     long                             reserved[2];
  916.     AddrBlock                         serverHint;
  917.     short                             dsRefNum;
  918.     unsigned long                     callID;
  919.     AuthIdentity                     identity;
  920.     long                             gReserved1;
  921.     long                             gReserved2;
  922.     long                             gReserved3;
  923.     long                             clientData;
  924.     AuthIdentity                     userIdentity;                /*  --> identity of principal */
  925.     RecordIDPtr                     recipient;                    /*  --> OCE name of recipient */
  926.     UTCTime                         firstValid;                    /*  --> time at which proxy becomes valid */
  927.     UTCTime                         expiry;                        /*  --> time at which proxy expires */
  928.     unsigned long                     authDataLength;                /*  --> size of authorization data */
  929.     void *                            authData;                    /*  --> pointer to authorization data */
  930.     unsigned long                     proxyLength;                /* <--> max/actual proxy size */
  931.     void *                            proxy;                        /* <--> buffer where proxy is returned */
  932.     RecordIDPtr                     intermediary;                /*  --> RecordID of intermediary */
  933. };
  934. typedef struct AuthMakeProxyPB            AuthMakeProxyPB;
  935. /*
  936. kAuthTradeProxyForCredentials:
  937. Using this call, intermediary holding a 'proxy' for a recipient may obtain credentials
  938. for that recipient. 'userIdentity' is the identity for the 'intermediary'.
  939. 'recipient' is the RecordID for whom credetials are requested.
  940. 'principal' is the RecordID of the user who created the proxy.
  941. 'proxyLength' is the length of data pointed by 'proxy.
  942. If the call is succesfull, credentials will be returned in the
  943. buffer pointed by 'credentials'. 'expiry' is the desired expiry time at input.
  944. When call succeds this will have expiry time of credentials.
  945. This is very similar to GetCredentials except that we (of course) need the proxy,
  946. but we also need the name of the principal who created the proxy.
  947. */
  948.  
  949. struct AuthTradeProxyForCredentialsPB {
  950.     void *                            qLink;
  951.     long                             reserved1;
  952.     long                             reserved2;
  953.     AuthIOCompletionUPP             ioCompletion;
  954.     OSErr                             ioResult;
  955.     unsigned long                     saveA5;
  956.     short                             reqCode;
  957.     long                             reserved[2];
  958.     AddrBlock                         serverHint;
  959.     short                             dsRefNum;
  960.     unsigned long                     callID;
  961.     AuthIdentity                     identity;
  962.     long                             gReserved1;
  963.     long                             gReserved2;
  964.     long                             gReserved3;
  965.     long                             clientData;
  966.     AuthIdentity                     userIdentity;                /*  --> identity of intermediary */
  967.     RecordIDPtr                     recipient;                    /*  --> OCE name of recipient */
  968.     AuthKeyPtr                         sessionKey;                    /* <--  session key */
  969.     UTCTime                         expiry;                        /* <--> desired/actual expiry */
  970.     unsigned long                     credentialsLength;            /* <--> max/actual credentials size */
  971.     void *                            credentials;                /* <--> buffer where credentials are returned */
  972.     unsigned long                     proxyLength;                /*  --> actual proxy size */
  973.     void *                            proxy;                        /*  --> buffer containing proxy */
  974.     RecordIDPtr                     principal;                    /*  --> RecordID of principal */
  975. };
  976. typedef struct AuthTradeProxyForCredentialsPB AuthTradeProxyForCredentialsPB;
  977. /* API for Local Identity Interface */
  978. /*
  979. AuthGetLocalIdentityPB:
  980. A Collaborative application intended to work under the umbrella of LocalIdentity
  981. for the OCE toolbox will have to make this call to obtain LocalIdentity.
  982. If LocalIdentity has not been setup, then application will get
  983. 'kOCEOCESetupRequired.'. In this case application should put the dialog
  984. recommended by the OCE Setup document and guide the user through OCE Setup.
  985. If the OCESetup contains local identity, but user has not unlocked, it will get
  986. kOCELocalAuthenticationFail. In this case application should use SDPPromptForLocalIdentity
  987. to prompt user for the password.
  988. If a backGround application or stand alone code requires LocalIdentity, if it gets the
  989. OSErr from LocalIdentity and can not call SDPPromptForLocalIdentity, it should it self
  990. register with the toolbox using kAuthAddToLocalIdentityQueue call. It will be notified
  991. when a LocalIdentity gets created by a foreground application.
  992. */
  993.  
  994. struct AuthGetLocalIdentityPB {
  995.     void *                            qLink;
  996.     long                             reserved1;
  997.     long                             reserved2;
  998.     AuthIOCompletionUPP             ioCompletion;
  999.     OSErr                             ioResult;
  1000.     unsigned long                     saveA5;
  1001.     short                             reqCode;
  1002.     long                             reserved[2];
  1003.     AddrBlock                         serverHint;
  1004.     short                             dsRefNum;
  1005.     unsigned long                     callID;
  1006.     AuthIdentity                     identity;
  1007.     long                             gReserved1;
  1008.     long                             gReserved2;
  1009.     long                             gReserved3;
  1010.     long                             clientData;
  1011.     LocalIdentity                     theLocalIdentity;            /* <--  LocalIdentity */
  1012. };
  1013. typedef struct AuthGetLocalIdentityPB    AuthGetLocalIdentityPB;
  1014. /*
  1015. kAuthUnlockLocalIdentity:
  1016. The LocalIdentity can be created using this call.
  1017. The userName and password correspond to the LocalIdentity setup.
  1018. If the password matches, then collabIdentity will be returned.
  1019. Typically SDPPromptForLocalIdentity call will make this call.
  1020. All applications which are registered through kAuthAddToLocalIdentityQueue
  1021. will be notified.
  1022. */
  1023.  
  1024. struct AuthUnlockLocalIdentityPB {
  1025.     void *                            qLink;
  1026.     long                             reserved1;
  1027.     long                             reserved2;
  1028.     AuthIOCompletionUPP             ioCompletion;
  1029.     OSErr                             ioResult;
  1030.     unsigned long                     saveA5;
  1031.     short                             reqCode;
  1032.     long                             reserved[2];
  1033.     AddrBlock                         serverHint;
  1034.     short                             dsRefNum;
  1035.     unsigned long                     callID;
  1036.     AuthIdentity                     identity;
  1037.     long                             gReserved1;
  1038.     long                             gReserved2;
  1039.     long                             gReserved3;
  1040.     long                             clientData;
  1041.     LocalIdentity                     theLocalIdentity;            /* <--  LocalIdentity */
  1042.     RStringPtr                         userName;                    /*  --> userName */
  1043.     RStringPtr                         password;                    /*  -->user password */
  1044. };
  1045. typedef struct AuthUnlockLocalIdentityPB AuthUnlockLocalIdentityPB;
  1046. /*
  1047. kAuthLockLocalIdentity:
  1048. With this call existing LocalIdentity can be locked. If the ASDeleteLocalIdetity
  1049. call fails with 'kOCEOperationDenied' error, name will contain the application which
  1050. denied the operation. This name will be supplied by the application
  1051. when it registered through kAuthAddToLocalIdentityQueue call
  1052. */
  1053.  
  1054. struct AuthLockLocalIdentityPB {
  1055.     void *                            qLink;
  1056.     long                             reserved1;
  1057.     long                             reserved2;
  1058.     AuthIOCompletionUPP             ioCompletion;
  1059.     OSErr                             ioResult;
  1060.     unsigned long                     saveA5;
  1061.     short                             reqCode;
  1062.     long                             reserved[2];
  1063.     AddrBlock                         serverHint;
  1064.     short                             dsRefNum;
  1065.     unsigned long                     callID;
  1066.     AuthIdentity                     identity;
  1067.     long                             gReserved1;
  1068.     long                             gReserved2;
  1069.     long                             gReserved3;
  1070.     long                             clientData;
  1071.     LocalIdentity                     theLocalIdentity;            /*  --> LocalIdentity */
  1072.     StringPtr                         name;                        /* <--  name of the app which denied delete */
  1073. };
  1074. typedef struct AuthLockLocalIdentityPB    AuthLockLocalIdentityPB;
  1075. typedef CALLBACK_API( Boolean , NotificationProcPtr )(long clientData, AuthLocalIdentityOp callValue, AuthLocalIdentityLockAction actionValue, LocalIdentity identity);
  1076. typedef STACK_UPP_TYPE(NotificationProcPtr)                     NotificationUPP;
  1077.  
  1078. typedef NotificationUPP                 NotificationProc;
  1079. /*
  1080. kAuthAddToLocalIdentityQueue:
  1081. An application requiring notification of locking/unlocking of the
  1082. LocalIdentity can install itself using this call. The function provided
  1083. in 'notifyProc' will be called whenever the requested event happens.
  1084. When an AuthLockLocalIdentity call is made to the toolbox, the notificationProc
  1085. will be called with 'kAuthLockPending'. The application may refuse the lock by returning
  1086. a 'true' value. If all the registered entries return 'false' value, locking will be done
  1087. successfully. Otherwise 'kOCEOperationDenied' error is returned to the caller. The appName
  1088. (registered with the notificationProc) of the application which denied locking is also
  1089. returned to the caller making the AuthLockIdentity call.
  1090. */
  1091.  
  1092. struct AuthAddToLocalIdentityQueuePB {
  1093.     void *                            qLink;
  1094.     long                             reserved1;
  1095.     long                             reserved2;
  1096.     AuthIOCompletionUPP             ioCompletion;
  1097.     OSErr                             ioResult;
  1098.     unsigned long                     saveA5;
  1099.     short                             reqCode;
  1100.     long                             reserved[2];
  1101.     AddrBlock                         serverHint;
  1102.     short                             dsRefNum;
  1103.     unsigned long                     callID;
  1104.     AuthIdentity                     identity;
  1105.     long                             gReserved1;
  1106.     long                             gReserved2;
  1107.     long                             gReserved3;
  1108.     long                             clientData;
  1109.     NotificationUPP                 notifyProc;                    /*  --> notification procedure */
  1110.     AuthNotifications                 notifyFlags;                /*  --> notifyFlags */
  1111.     StringPtr                         appName;                    /*  --> name of application to be returned in Delete/Stop */
  1112. };
  1113. typedef struct AuthAddToLocalIdentityQueuePB AuthAddToLocalIdentityQueuePB;
  1114. /*
  1115. kAuthRemoveFromLocalIdentityQueue:*/
  1116.  
  1117. struct AuthRemoveFromLocalIdentityQueuePB {
  1118.     void *                            qLink;
  1119.     long                             reserved1;
  1120.     long                             reserved2;
  1121.     AuthIOCompletionUPP             ioCompletion;
  1122.     OSErr                             ioResult;
  1123.     unsigned long                     saveA5;
  1124.     short                             reqCode;
  1125.     long                             reserved[2];
  1126.     AddrBlock                         serverHint;
  1127.     short                             dsRefNum;
  1128.     unsigned long                     callID;
  1129.     AuthIdentity                     identity;
  1130.     long                             gReserved1;
  1131.     long                             gReserved2;
  1132.     long                             gReserved3;
  1133.     long                             clientData;
  1134.     NotificationUPP                 notifyProc;                    /*  --> notification procedure */
  1135. };
  1136. typedef struct AuthRemoveFromLocalIdentityQueuePB AuthRemoveFromLocalIdentityQueuePB;
  1137. /*
  1138. kAuthSetupLocalIdentity:
  1139. The LocalIdentity can be Setup using this call.
  1140. The userName and password correspond to the LocalIdentity setup.
  1141. If a LocalIdentity Setup already exists 'kOCELocalIdentitySetupExists' error
  1142. will be returned.
  1143. */
  1144.  
  1145. struct AuthSetupLocalIdentityPB {
  1146.     void *                            qLink;
  1147.     long                             reserved1;
  1148.     long                             reserved2;
  1149.     AuthIOCompletionUPP             ioCompletion;
  1150.     OSErr                             ioResult;
  1151.     unsigned long                     saveA5;
  1152.     short                             reqCode;
  1153.     long                             reserved[2];
  1154.     AddrBlock                         serverHint;
  1155.     short                             dsRefNum;
  1156.     unsigned long                     callID;
  1157.     AuthIdentity                     identity;
  1158.     long                             gReserved1;
  1159.     long                             gReserved2;
  1160.     long                             gReserved3;
  1161.     long                             clientData;
  1162.     long                             aReserved;                    /*  --  */
  1163.     RStringPtr                         userName;                    /*  --> userName */
  1164.     RStringPtr                         password;                    /*  -->user password */
  1165. };
  1166. typedef struct AuthSetupLocalIdentityPB    AuthSetupLocalIdentityPB;
  1167. /*
  1168. kAuthChangeLocalIdentity:
  1169. An existing LocalIdentity  Setup can be changed using this call.
  1170. The userName and password correspond to the LocalIdentity setup.
  1171. If a LocalIdentity Setup does not exists 'kOCEOCESetupRequired' error
  1172. will be returned. The user can use  kAuthSetupLocalIdentity call to setit up.
  1173. If the 'password' does not correspond to the existing setup, 'kOCELocalAuthenticationFail'
  1174. OSErr will be returned. If successful, LocalID will have new name as 'userName' and
  1175. password as 'newPassword' and if any applications has installed into 
  1176. LocalIdentityQueue with kNotifyNameChangeMask set, it will be notified with 
  1177. kAuthLocalIdentityNameChangeOp action value. 
  1178.  
  1179. */
  1180.  
  1181. struct AuthChangeLocalIdentityPB {
  1182.     void *                            qLink;
  1183.     long                             reserved1;
  1184.     long                             reserved2;
  1185.     AuthIOCompletionUPP             ioCompletion;
  1186.     OSErr                             ioResult;
  1187.     unsigned long                     saveA5;
  1188.     short                             reqCode;
  1189.     long                             reserved[2];
  1190.     AddrBlock                         serverHint;
  1191.     short                             dsRefNum;
  1192.     unsigned long                     callID;
  1193.     AuthIdentity                     identity;
  1194.     long                             gReserved1;
  1195.     long                             gReserved2;
  1196.     long                             gReserved3;
  1197.     long                             clientData;
  1198.     long                             aReserved;                    /*  --  */
  1199.     RStringPtr                         userName;                    /*  --> userName */
  1200.     RStringPtr                         password;                    /*  --> current password */
  1201.     RStringPtr                         newPassword;                /*  --> new password */
  1202. };
  1203. typedef struct AuthChangeLocalIdentityPB AuthChangeLocalIdentityPB;
  1204. /*
  1205. kAuthRemoveLocalIdentity:
  1206. An existing LocalIdentity  Setup can be removed using this call.
  1207. The userName and password correspond to the LocalIdentity setup.
  1208. If a LocalIdentity Setup does not exists 'kOCEOCESetupRequired' error
  1209. will be returned.
  1210. If the 'password' does not correspond to the existing setup, 'kOCELocalAuthenticationFail'
  1211. OSErr will be returned. If successful, LocalIdentity will be removed from the OCE Setup.
  1212. This is a very distructive operation, user must be warned enough before actually making
  1213. this call.
  1214. */
  1215.  
  1216. struct AuthRemoveLocalIdentityPB {
  1217.     void *                            qLink;
  1218.     long                             reserved1;
  1219.     long                             reserved2;
  1220.     AuthIOCompletionUPP             ioCompletion;
  1221.     OSErr                             ioResult;
  1222.     unsigned long                     saveA5;
  1223.     short                             reqCode;
  1224.     long                             reserved[2];
  1225.     AddrBlock                         serverHint;
  1226.     short                             dsRefNum;
  1227.     unsigned long                     callID;
  1228.     AuthIdentity                     identity;
  1229.     long                             gReserved1;
  1230.     long                             gReserved2;
  1231.     long                             gReserved3;
  1232.     long                             clientData;
  1233.     long                             aReserved;                    /*  --  */
  1234.     RStringPtr                         userName;                    /*  --> userName */
  1235.     RStringPtr                         password;                    /*  --> current password */
  1236. };
  1237. typedef struct AuthRemoveLocalIdentityPB AuthRemoveLocalIdentityPB;
  1238. /*
  1239. kOCESetupAddDirectoryInfo:
  1240. Using this call identity for a catalog can be setup under LocalIdentity umbrella.
  1241. ASCreateLocalIdentity should have been done succesfully before making this call.    
  1242. directoryRecordCID -> is the record creationID obtained when DirAddOCEDirectory or
  1243. DirAddDSAMDirectory call was made.
  1244. rid-> is the recordID in which the identity for the catalog will be established.
  1245. password-> the password associated with the rid in the catalog world.
  1246. */
  1247.  
  1248. struct OCESetupAddDirectoryInfoPB {
  1249.     void *                            qLink;
  1250.     long                             reserved1;
  1251.     long                             reserved2;
  1252.     AuthIOCompletionUPP             ioCompletion;
  1253.     OSErr                             ioResult;
  1254.     unsigned long                     saveA5;
  1255.     short                             reqCode;
  1256.     long                             reserved[2];
  1257.     AddrBlock                         serverHint;
  1258.     short                             dsRefNum;
  1259.     unsigned long                     callID;
  1260.     AuthIdentity                     identity;
  1261.     long                             gReserved1;
  1262.     long                             gReserved2;
  1263.     long                             gReserved3;
  1264.     long                             clientData;
  1265.     CreationID                         directoryRecordCID;            /*  --> CreationID for the catalog */
  1266.     RecordIDPtr                     recordID;                    /*  --> recordID for the identity */
  1267.     RStringPtr                         password;                    /*  --> password in the catalog world */
  1268. };
  1269. typedef struct OCESetupAddDirectoryInfoPB OCESetupAddDirectoryInfoPB;
  1270. /*
  1271. kOCESetupChangeDirectoryInfo:
  1272. Using this call an existing identity for a catalog under LocalIdentity umbrella
  1273. can be changed.
  1274. ASCreateLocalIdentity should have been done succesfully before making this call.
  1275. directoryRecordCID -> is the record creationID obtained when DirAddOCEDirectory or
  1276. DirAddDSAMDirectory call was made.
  1277. rid-> is the recordID in which the identity for the catalog will be established.
  1278. password-> the password associated with the rid in the catalog world.
  1279. newPassword -> the new password for the catalog
  1280. */
  1281.  
  1282. struct OCESetupChangeDirectoryInfoPB {
  1283.     void *                            qLink;
  1284.     long                             reserved1;
  1285.     long                             reserved2;
  1286.     AuthIOCompletionUPP             ioCompletion;
  1287.     OSErr                             ioResult;
  1288.     unsigned long                     saveA5;
  1289.     short                             reqCode;
  1290.     long                             reserved[2];
  1291.     AddrBlock                         serverHint;
  1292.     short                             dsRefNum;
  1293.     unsigned long                     callID;
  1294.     AuthIdentity                     identity;
  1295.     long                             gReserved1;
  1296.     long                             gReserved2;
  1297.     long                             gReserved3;
  1298.     long                             clientData;
  1299.     CreationID                         directoryRecordCID;            /*  --> CreationID for the catalog */
  1300.     RecordIDPtr                     recordID;                    /*  --> recordID for the identity */
  1301.     RStringPtr                         password;                    /*  --> password in the catalog world */
  1302.     RStringPtr                         newPassword;                /*  --> new password in the catalog */
  1303. };
  1304. typedef struct OCESetupChangeDirectoryInfoPB OCESetupChangeDirectoryInfoPB;
  1305. /*
  1306. kOCESetupRemoveDirectoryInfo:
  1307. Using this call an existing identity for a catalog under LocalIdentity umbrella
  1308. can be changed.
  1309. ASCreateLocalIdentity should have been done succesfully before making this call.
  1310. directoryRecordCID -> is the record creationID obtained when DirAddOCEDirectory or
  1311. */
  1312.  
  1313. struct OCESetupRemoveDirectoryInfoPB {
  1314.     void *                            qLink;
  1315.     long                             reserved1;
  1316.     long                             reserved2;
  1317.     AuthIOCompletionUPP             ioCompletion;
  1318.     OSErr                             ioResult;
  1319.     unsigned long                     saveA5;
  1320.     short                             reqCode;
  1321.     long                             reserved[2];
  1322.     AddrBlock                         serverHint;
  1323.     short                             dsRefNum;
  1324.     unsigned long                     callID;
  1325.     AuthIdentity                     identity;
  1326.     long                             gReserved1;
  1327.     long                             gReserved2;
  1328.     long                             gReserved3;
  1329.     long                             clientData;
  1330.     CreationID                         directoryRecordCID;            /*  --> CreationID for the catalog */
  1331. };
  1332. typedef struct OCESetupRemoveDirectoryInfoPB OCESetupRemoveDirectoryInfoPB;
  1333. /*
  1334. kOCESetupGetDirectoryInfo:
  1335. Using this call info on an existing identity for a particular catalog under LocalIdentity umbrella
  1336. can be obtained.
  1337. For the specified catalog 'directoryName' and 'discriminator', rid and nativeName will
  1338. returned. Caller must provide appropriate buffer to get back rid and nativeName.
  1339. 'password' will be returned  for  non-ADAP Catalogs.
  1340. */
  1341.  
  1342. struct OCESetupGetDirectoryInfoPB {
  1343.     void *                            qLink;
  1344.     long                             reserved1;
  1345.     long                             reserved2;
  1346.     AuthIOCompletionUPP             ioCompletion;
  1347.     OSErr                             ioResult;
  1348.     unsigned long                     saveA5;
  1349.     short                             reqCode;
  1350.     long                             reserved[2];
  1351.     AddrBlock                         serverHint;
  1352.     short                             dsRefNum;
  1353.     unsigned long                     callID;
  1354.     AuthIdentity                     identity;
  1355.     long                             gReserved1;
  1356.     long                             gReserved2;
  1357.     long                             gReserved3;
  1358.     long                             clientData;
  1359.     DirectoryNamePtr                 directoryName;                /*  --> catalog name */
  1360.     DirDiscriminator                 discriminator;                /*  --> discriminator for the catalog */
  1361.     RecordIDPtr                     recordID;                    /* <--  rid for the catalog identity */
  1362.     RStringPtr                         nativeName;                    /* <--  user name in the catalog world */
  1363.     RStringPtr                         password;                    /* <--  password in the catalog world */
  1364. };
  1365. typedef struct OCESetupGetDirectoryInfoPB OCESetupGetDirectoryInfoPB;
  1366. /*****************************************************************************
  1367.  
  1368.  
  1369.          Catalog Manager operations
  1370.  
  1371.  
  1372. *****************************************************************************/
  1373. typedef union DirParamBlock             DirParamBlock;
  1374.  
  1375. typedef DirParamBlock *                    DirParamBlockPtr;
  1376. typedef CALLBACK_API( void , DirIOCompletionProcPtr )(DirParamBlockPtr paramBlock);
  1377. /*
  1378.     WARNING: DirIOCompletionProcPtr uses register based parameters under classic 68k
  1379.              and cannot be written in a high-level language without 
  1380.              the help of mixed mode or assembly glue.
  1381. */
  1382. typedef REGISTER_UPP_TYPE(DirIOCompletionProcPtr)                 DirIOCompletionUPP;
  1383. /* AddRecord */
  1384.  
  1385. struct DirAddRecordPB {
  1386.     void *                            qLink;
  1387.     long                             reserved1;
  1388.     long                             reserved2;
  1389.     DirIOCompletionUPP                 ioCompletion;
  1390.     OSErr                             ioResult;
  1391.     unsigned long                     saveA5;
  1392.     short                             reqCode;
  1393.     long                             reserved[2];
  1394.     AddrBlock                         serverHint;
  1395.     short                             dsRefNum;
  1396.     unsigned long                     callID;
  1397.     AuthIdentity                     identity;
  1398.     long                             gReserved1;
  1399.     long                             gReserved2;
  1400.     long                             gReserved3;
  1401.     long                             clientData;
  1402.     RecordIDPtr                     aRecord;                    /*  --> CreationID returned here */
  1403.     Boolean                         allowDuplicate;                /*  --> */
  1404.     Boolean                         filler1;
  1405. };
  1406. typedef struct DirAddRecordPB            DirAddRecordPB;
  1407.  
  1408.  
  1409. /* DeleteRecord */
  1410.  
  1411. struct DirDeleteRecordPB {
  1412.     void *                            qLink;
  1413.     long                             reserved1;
  1414.     long                             reserved2;
  1415.     DirIOCompletionUPP                 ioCompletion;
  1416.     OSErr                             ioResult;
  1417.     unsigned long                     saveA5;
  1418.     short                             reqCode;
  1419.     long                             reserved[2];
  1420.     AddrBlock                         serverHint;
  1421.     short                             dsRefNum;
  1422.     unsigned long                     callID;
  1423.     AuthIdentity                     identity;
  1424.     long                             gReserved1;
  1425.     long                             gReserved2;
  1426.     long                             gReserved3;
  1427.     long                             clientData;
  1428.     RecordIDPtr                     aRecord;                    /*  --> */
  1429. };
  1430. typedef struct DirDeleteRecordPB        DirDeleteRecordPB;
  1431. /* aRecord must contain valid PackedRLI and a CreationID. */
  1432.  
  1433.  
  1434. /**********************************************************************************/
  1435. /*
  1436. DirEnumerate:
  1437. This call can be used to enumerate both DNodes and records under a specified
  1438. DNode. A DNode is specified by the PackedRLIPtr 'aRLI'.
  1439.  
  1440. startingPoint indicates where to start the enumeration.  Initially,
  1441. it should be set to a value of nil.  After some records are enumerated,
  1442. the client can issue the call again with the same aRLI and recordName and
  1443. typeList. The last received DirEnumSpec in the startingPoint field.  The server
  1444. will continue the enumeration from that record on. if user wants to get back the
  1445. value specified in the startingRecord also, the Boolean 'includeStartingPoint'
  1446. must be set to 'true'. If this is set to 'false', records specified after the
  1447. startingPoint record will be returned.
  1448.  
  1449. sortBy indicates to the server to return the records that match in name-first
  1450. or type-first order.  sortDirection indicates to the server to search in forward
  1451. or backward sort order for RecordIDs Specified.
  1452.  
  1453. RecordIDS and Enumeration Criteria:
  1454.  
  1455. PackedRLIPtr parameter 'aRLI' will be accepted for DNode
  1456. specification.
  1457.  
  1458. One RStringPtr 'nameMatchString' is provided. User is allowed to
  1459. specify a wild card in the name. WildCard specification is specified in 
  1460. matchNameHow parameter and possible values are defined in DirMatchWith Enum.
  1461.  
  1462. 'typeCount' parameter indicate how many types are in the 'typeList'.
  1463.  
  1464. 'typeList' parmeter is a pointer to an RString array of size 'typeCount'.
  1465.  
  1466. If 'typeCount' is exactly equal to one, a wild card can be specified
  1467. for the entity type; otherwise types have to be completely specified.
  1468. WildCard specification is specified in  matchNameHow parameter
  1469.  and possible values are defined in DirMatchWith Enum.
  1470.  
  1471.  
  1472. A nil value for 'startingPoint' is allowed when sortDirection specified
  1473. is 'kSortBackwards'. This was not allowed previously.
  1474.  
  1475. 'enumFlags' parameter is a bit field. The following bits can be set:
  1476.     kEnumDistinguishedNameMask to get back records in the cluster data base.
  1477.     kEnumAliasMask to get back record aliases
  1478.     kEnumPseudonymMask to get back record pseudonyms
  1479.     kEnumDNodeMask to get back any children dNodes for the DNode specified in the
  1480.     'aRLI' parameter.
  1481.     kEnumForeignDNodeMask to get back any children dNodes which have ForeignDnodes in the
  1482.     dNode specified in the 'aRLI' parameter.
  1483.  
  1484.     kEnumAll is combination of all five values and can be used to enumerate
  1485.     everything under a specified DNode.
  1486.  
  1487.  
  1488.  
  1489. The results returned for each element will consist of a DirEnumSpec.
  1490. The DirEnumSpec contains 'enumFlag' which indicates the type of entity and a
  1491. union which will have either DNodeID or LocalRecordID depending on the value of 'enumFlag'.
  1492. The 'enumFlag'  will indicate whether the returned element is a
  1493. record(kEnumDistinguishedNameMask bit) or a alias(kEnumAliasMask bit) or a
  1494. Pseudonym(kEnumPseudonymMask) or a child DNode(kEnumDNodeMask bit).  If the 'enumFlag' value
  1495. is kEnumDnodeMask, it indicates the value returned in the union is a DNodeID (i.e. 'dNodeNumber'
  1496. is the 'dNodeNumber' of the child dnode(if the catalog supports dNodeNumbers, otherwise
  1497. this will be set to zero). The name will be the child dnode name. For other values of the
  1498. 'enumFlag', the value in the union will be LocalRecordID. In addition to kEnumDnodeMask it is
  1499. possible that kEnumForeignDNodeMask is also set. This is an advisory bit and application must make
  1500. it's own decision before displaying these records. If catalog supports kSupportIndexRatioMask, it
  1501. may also return the relative position of the record (percentile of total records) in the 
  1502. indexRatio field in EnumSpec.
  1503.  
  1504.  
  1505. responseSLRV will contain the script, language, region and version of the oce sorting software.
  1506. The results will be collected in the 'getBuffer' supplied by the user.
  1507. If buffer can not hold all the data returned 'kOCEMoreData' error will be returned.
  1508.  
  1509. If user receives 'noErr' or 'kOCEMoreData', buffer will contain valid results. A user
  1510. can extract the results in the 'getBuffer' by making DirEnumerateParse' call.
  1511. */
  1512.  
  1513.  
  1514. struct DirEnumerateGetPB {
  1515.     void *                            qLink;
  1516.     long                             reserved1;
  1517.     long                             reserved2;
  1518.     DirIOCompletionUPP                 ioCompletion;
  1519.     OSErr                             ioResult;
  1520.     unsigned long                     saveA5;
  1521.     short                             reqCode;
  1522.     long                             reserved[2];
  1523.     AddrBlock                         serverHint;
  1524.     short                             dsRefNum;
  1525.     unsigned long                     callID;
  1526.     AuthIdentity                     identity;
  1527.     long                             gReserved1;
  1528.     long                             gReserved2;
  1529.     long                             gReserved3;
  1530.     long                             clientData;
  1531.     PackedRLIPtr                     aRLI;                        /*  --> an RLI specifying the cluster to be enumerated */
  1532.     DirEnumSpec *                    startingPoint;                /*  --> */
  1533.     DirSortOption                     sortBy;                        /*  --> */
  1534.     DirSortDirection                 sortDirection;                /*  --> */
  1535.     long                             dReserved;                    /*  --  */
  1536.     RStringPtr                         nameMatchString;            /*  --> name from which enumeration should start */
  1537.     RStringPtr *                    typesList;                    /*  --> list of entity types to be enumerated */
  1538.     unsigned long                     typeCount;                    /*  --> number of types in the list */
  1539.     DirEnumChoices                     enumFlags;                    /*  --> indicates what to enumerate */
  1540.     Boolean                         includeStartingPoint;        /*  --> if true return the record specified in starting point */
  1541.     Byte                             padByte;
  1542.     DirMatchWith                     matchNameHow;                /*  --> Matching Criteria for nameMatchString */
  1543.     DirMatchWith                     matchTypeHow;                /*  --> Matching Criteria for typeList */
  1544.     void *                            getBuffer;                    /*  --> */
  1545.     unsigned long                     getBufferSize;                /*  --> */
  1546.     SLRV                             responseSLRV;                /*  <--  response SLRV */
  1547. };
  1548. typedef struct DirEnumerateGetPB        DirEnumerateGetPB;
  1549. /* The EnumerateRecords call-back function is defined as follows: */
  1550. typedef CALLBACK_API( Boolean , ForEachDirEnumSpecProcPtr )(long clientData, const DirEnumSpec *enumSpec);
  1551. typedef STACK_UPP_TYPE(ForEachDirEnumSpecProcPtr)                 ForEachDirEnumSpecUPP;
  1552.  
  1553. typedef ForEachDirEnumSpecUPP             ForEachDirEnumSpec;
  1554. /*
  1555. EnumerateParse:
  1556. After an EnumerateGet call has completed, call EnumerateParse
  1557. to parse through the buffer that was filled in EnumerateGet.
  1558.  
  1559. 'eachEnumSpec' will be called each time to return to the client a
  1560. DirEnumSpec that matches the pattern for enumeration. 'enumFlag' indicates the type
  1561. of information returned in the DirEnumSpec
  1562. The clientData parameter that you pass in the parameter block will be passed
  1563. to 'forEachEnumDSSpecFunc'.  You are free to put anything in clientData - it is intended
  1564. to allow you some way to match the call-back to the original call (for
  1565. example, you make more then one aysynchronous EnumerateGet calls and you want to
  1566. associate returned results in some way).
  1567.  
  1568. The client should return FALSE from 'eachEnumSpec' to continue
  1569. processing of the EnumerateParse request.  Returning TRUE will
  1570. terminate the EnumerateParse request.
  1571.  
  1572. For synchronous calls, the call-back routine actually runs as part of the same thread
  1573. of execution as the thread that made the EnumerateParse call.  That means that the
  1574. same low-memory globals, A5, stack, etc. are in effect during the call-back
  1575. that were in effect when the call was made.  Because of this, the call-back
  1576. routine has the same restrictions as the caller of EnumerateParse:
  1577. if EnumerateParse was not called from interrupt level, then the call-
  1578. back routine can allocate memory. For asynchronous calls, call-back routine is
  1579. like a ioCompletion except that A5 will be preserved for the application.
  1580. */
  1581.  
  1582. struct DirEnumerateParsePB {
  1583.     void *                            qLink;
  1584.     long                             reserved1;
  1585.     long                             reserved2;
  1586.     DirIOCompletionUPP                 ioCompletion;
  1587.     OSErr                             ioResult;
  1588.     unsigned long                     saveA5;
  1589.     short                             reqCode;
  1590.     long                             reserved[2];
  1591.     AddrBlock                         serverHint;
  1592.     short                             dsRefNum;
  1593.     unsigned long                     callID;
  1594.     AuthIdentity                     identity;
  1595.     long                             gReserved1;
  1596.     long                             gReserved2;
  1597.     long                             gReserved3;
  1598.     long                             clientData;
  1599.     PackedRLIPtr                     aRLI;                        /*  --> an RLI specifying the cluster to be enumerated */
  1600.     long                             bReserved;                    /*  --  */
  1601.     long                             cReserved;                    /*  --  */
  1602.     ForEachDirEnumSpec                 eachEnumSpec;                /*  --> */
  1603.     long                             eReserved;                    /*  --  */
  1604.     long                             fReserved;                    /*  --  */
  1605.     long                             gReserved;                    /*  --  */
  1606.     long                             hReserved;                    /*  --  */
  1607.     long                             iReserved;                    /*  --  */
  1608.     void *                            getBuffer;                    /*  --> */
  1609.     unsigned long                     getBufferSize;                /*  --> */
  1610.     short                             l1Reserved;                    /*  -- */
  1611.     short                             l2Reserved;                    /*  --  */
  1612.     short                             l3Reserved;                    /*  -- */
  1613.     short                             l4Reserved;                    /*  --  */
  1614.  
  1615. };
  1616. typedef struct DirEnumerateParsePB        DirEnumerateParsePB;
  1617. /*
  1618.  * FindRecordGet operates similarly to DirEnumerate except it returns a list
  1619.  * of records instead of records local to a cluster.
  1620. */
  1621.  
  1622. struct DirFindRecordGetPB {
  1623.     void *                            qLink;
  1624.     long                             reserved1;
  1625.     long                             reserved2;
  1626.     DirIOCompletionUPP                 ioCompletion;
  1627.     OSErr                             ioResult;
  1628.     unsigned long                     saveA5;
  1629.     short                             reqCode;
  1630.     long                             reserved[2];
  1631.     AddrBlock                         serverHint;
  1632.     short                             dsRefNum;
  1633.     unsigned long                     callID;
  1634.     AuthIdentity                     identity;
  1635.     long                             gReserved1;
  1636.     long                             gReserved2;
  1637.     long                             gReserved3;
  1638.     long                             clientData;
  1639.     RecordIDPtr                     startingPoint;
  1640.     long                             reservedA[2];
  1641.     RStringPtr                         nameMatchString;
  1642.     RStringPtr *                    typesList;
  1643.     unsigned long                     typeCount;
  1644.     long                             reservedB;
  1645.     short                             reservedC;
  1646.     DirMatchWith                     matchNameHow;
  1647.     DirMatchWith                     matchTypeHow;
  1648.     void *                            getBuffer;
  1649.     unsigned long                     getBufferSize;
  1650.     DirectoryNamePtr                 directoryName;
  1651.     DirDiscriminator                 discriminator;
  1652. };
  1653. typedef struct DirFindRecordGetPB        DirFindRecordGetPB;
  1654. /* The FindRecordParse call-back function is defined as follows: */
  1655. typedef CALLBACK_API( Boolean , ForEachRecordProcPtr )(long clientData, const DirEnumSpec *enumSpec, PackedRLIPtr pRLI);
  1656. typedef STACK_UPP_TYPE(ForEachRecordProcPtr)                     ForEachRecordUPP;
  1657.  
  1658. typedef ForEachRecordUPP                 ForEachRecord;
  1659. /*
  1660.  * This PB same as DirFindRecordGet except it includes the callback function
  1661. */
  1662.  
  1663. struct DirFindRecordParsePB {
  1664.     void *                            qLink;
  1665.     long                             reserved1;
  1666.     long                             reserved2;
  1667.     DirIOCompletionUPP                 ioCompletion;
  1668.     OSErr                             ioResult;
  1669.     unsigned long                     saveA5;
  1670.     short                             reqCode;
  1671.     long                             reserved[2];
  1672.     AddrBlock                         serverHint;
  1673.     short                             dsRefNum;
  1674.     unsigned long                     callID;
  1675.     AuthIdentity                     identity;
  1676.     long                             gReserved1;
  1677.     long                             gReserved2;
  1678.     long                             gReserved3;
  1679.     long                             clientData;
  1680.     RecordIDPtr                     startingPoint;
  1681.     long                             reservedA[2];
  1682.     RStringPtr                         nameMatchString;
  1683.     RStringPtr *                    typesList;
  1684.     unsigned long                     typeCount;
  1685.     long                             reservedB;
  1686.     short                             reservedC;
  1687.     DirMatchWith                     matchNameHow;
  1688.     DirMatchWith                     matchTypeHow;
  1689.     void *                            getBuffer;
  1690.     unsigned long                     getBufferSize;
  1691.     DirectoryNamePtr                 directoryName;
  1692.     DirDiscriminator                 discriminator;
  1693.     ForEachRecord                     forEachRecordFunc;
  1694.  
  1695. };
  1696. typedef struct DirFindRecordParsePB        DirFindRecordParsePB;
  1697.  
  1698.  
  1699. /*
  1700. LookupGet:
  1701.  
  1702. aRecordList is an array of pointers to RecordIDs, each of which must
  1703. contain valid PackedRLI and a CreationID.  recordIDCount is
  1704. the size of this array.
  1705.  
  1706. attrTypeList is an array of pointers to AttributeTypes.  attrTypeCount is
  1707. the size of this array.
  1708.  
  1709. staringRecordIndex is the record from which to continue the lookup.
  1710. If you want to start from first record in the list, this must be 1 (not zero).
  1711. This value must always be <= recordIDCount.
  1712.  
  1713. startingAttributeIndex is the AttributeType from which we want to continue the lookup.
  1714. If you want to start from first attribute in the list, this must be 1 (not zero).
  1715. This value must always be <= attrTypeCount.
  1716.  
  1717. startingAttribute is the value of the attribute value from which we want to
  1718. continue lookup. In case of catalogs supporting creationIDs, startingAttribute
  1719. may contain only a CID. Other catalogs may require the entire value.
  1720. If a non-null cid is given and if an attribute value with that cid is not found, this
  1721. call will terminate with kOCENoSuchAttribute error. A client should not make a LookupParse call
  1722. after getting this error.
  1723.  
  1724. 'includeStartingPoint' boolean can be set to 'true' to receive the value specified in the
  1725. startingPoint in the results returned. If this is set to 'false', the value
  1726. specified in the startingAttribute will not be returned.
  1727.  
  1728. When LookupGet call fails with kOCEMoreData, the client will be able to find out where the call ended
  1729. with a subsequent LookupParse call. When the LookupParse call completes with kOCEMoreData,
  1730. lastRecordIndex, lastAttributeIndex and lastValueCID will point to the corresponding
  1731. recordID, attributeType and the CreationID of the last value returned successfully. These parameters
  1732. are exactly the same ones for the startingRecordIndex, startingAttributeIndex, and startingAttrValueCID
  1733. so they can be used in a subsequent LookupGet call to continue the lookup.
  1734.  
  1735. In an extreme case, It is possible that we had an attribute value that is too large to fit
  1736. in the client's buffer. In such cases, if it was the only thing that we tried to fit
  1737. into the buffer, the client will not able to proceed further because he will not know the
  1738. attributeCID of the attribute to continue with.  Also he does not know how big a buffer
  1739. would be needed for the next call to get this 'mondo' attribute value successfully.
  1740.  
  1741. to support this, LookupParse call will do the following:
  1742.  
  1743. If LookupGet has failed with kOCEMoreData error, LookupParse will check to make sure that
  1744. ForEachAttributeValueFunc has been called at least once. If so, the client has the option
  1745. to continue from that attribute CreationID (for PAB/ADAP) in the next LookupGet call.
  1746. However, if it was not even called once, then the attribute value may be too big to fit in the
  1747. user's buffer. In this case, lastAttrValueCID (lastAttribute) and attrSize are returned in the
  1748. parse buffer and the call will fail with kOCEMoreAttrValue. However, it is possible that
  1749. ForEachAttributeValue was not called because the user does not have read access to some of
  1750. the attributeTypes in the list, and the buffer was full before even reading the creationID of
  1751. any of the attribute values.  A kOCEMoreData error is returned.
  1752.  
  1753. The Toolbox will check for duplicate RecordIDs in the aRecordList. If found, it will return
  1754. 'daDuplicateRecordIDErr'.
  1755.  
  1756. The Toolbox will check for duplicate AttributeTypes in the attrTypeList. If found it will
  1757. return 'daDuplicateAttrTypeErr'.
  1758. */
  1759.  
  1760. struct DirLookupGetPB {
  1761.     void *                            qLink;
  1762.     long                             reserved1;
  1763.     long                             reserved2;
  1764.     DirIOCompletionUPP                 ioCompletion;
  1765.     OSErr                             ioResult;
  1766.     unsigned long                     saveA5;
  1767.     short                             reqCode;
  1768.     long                             reserved[2];
  1769.     AddrBlock                         serverHint;
  1770.     short                             dsRefNum;
  1771.     unsigned long                     callID;
  1772.     AuthIdentity                     identity;
  1773.     long                             gReserved1;
  1774.     long                             gReserved2;
  1775.     long                             gReserved3;
  1776.     long                             clientData;
  1777.     RecordIDPtr *                    aRecordList;                /*  --> an array of RecordID pointers */
  1778.     AttributeTypePtr *                attrTypeList;                /*  --> an array of attribute types */
  1779.     long                             cReserved;                    /*  --  */
  1780.     long                             dReserved;                    /*  --  */
  1781.     long                             eReserved;                    /*  --  */
  1782.     long                             fReserved;                    /*  --  */
  1783.     unsigned long                     recordIDCount;                /*  --> */
  1784.     unsigned long                     attrTypeCount;                /*  --> */
  1785.     Boolean                         includeStartingPoint;        /*  --> if true return the value specified by the starting indices */
  1786.     Byte                             padByte;
  1787.     short                             i1Reserved;                    /*  --  */
  1788.     void *                            getBuffer;                    /*  --> */
  1789.     unsigned long                     getBufferSize;                /*  --> */
  1790.     unsigned long                     startingRecordIndex;        /*  --> start from this record */
  1791.     unsigned long                     startingAttrTypeIndex;        /*  --> start from this attribute type */
  1792.     Attribute                         startingAttribute;            /*  --> start from this attribute value */
  1793.     long                             pReserved;                    /*  --  */
  1794. };
  1795. typedef struct DirLookupGetPB            DirLookupGetPB;
  1796. /* The Lookup call-back functions are defined as follows: */
  1797. typedef CALLBACK_API( Boolean , ForEachLookupRecordIDProcPtr )(long clientData, const RecordID *recordID);
  1798. typedef STACK_UPP_TYPE(ForEachLookupRecordIDProcPtr)             ForEachLookupRecordIDUPP;
  1799.  
  1800. typedef ForEachLookupRecordIDUPP         ForEachLookupRecordID;
  1801. typedef CALLBACK_API( Boolean , ForEachAttrTypeLookupProcPtr )(long clientData, const AttributeType *attrType, AccessMask myAttrAccMask);
  1802. typedef STACK_UPP_TYPE(ForEachAttrTypeLookupProcPtr)             ForEachAttrTypeLookupUPP;
  1803. typedef ForEachAttrTypeLookupUPP         ForEachAttrTypeLookup;
  1804. typedef CALLBACK_API( Boolean , ForEachAttrValueProcPtr )(long clientData, const Attribute *attribute);
  1805. typedef STACK_UPP_TYPE(ForEachAttrValueProcPtr)                 ForEachAttrValueUPP;
  1806. typedef ForEachAttrValueUPP             ForEachAttrValue;
  1807. /*
  1808. LookupParse:
  1809.  
  1810. After a LookupGet call has completed, call LookupParse
  1811. to parse through the buffer that was filled in LookupGet.  The
  1812. toolbox will parse through the buffer and call the appropriate call-back routines
  1813. for each item in the getBuffer.
  1814.  
  1815. 'eachRecordID' will be called each time to return to the client one of the
  1816. RecordIDs from aRecordList.  The clientData parameter that you
  1817. pass in the parameter block will be passed to eachRecordID.
  1818. You are free to put anything in clientData - it is intended to allow
  1819. you some way to match the call-back to the original call (in case, for
  1820. example, you make simultaneous asynchronous LookupGet calls).  If you don't
  1821. want to get a call-back for each RecordID (for example, if you're looking up
  1822. attributes for only one RecordID), pass nil for eachRecordID.
  1823.  
  1824. After forEachLocalRecordIDFunc is called, eachAttrType may be called to pass an
  1825. attribute type (one from attrTypeList) that exists in the record specified
  1826. in the last eachRecordID call.  If you don't want to get a call-back for
  1827. each AttributeType (for example, if you're looking up only one attribute type,
  1828. or you prefer to read the type from the Attribute struct during the eachAttrValue
  1829. call-back routine), pass nil for eachAttrType. However access controls may
  1830. prohibit you from reading some attribute types; in that case eachAttrValue
  1831. may not be called even though the value exists. Hence the client should
  1832. supply this call-back function to see the access controls for each attribute type.
  1833.  
  1834. This will be followed by one or more calls to eachAttrValue, to pass the
  1835. type, tag, and attribute value.  NOTE THIS CHANGE:  you are no longer expected to
  1836. pass a pointer to a buffer in which to put the value.  Now you get a pointer to
  1837. the value, and you can process it within the call-back routine.
  1838. After one or more values are returned, eachAttrType may be called again to pass
  1839. another attribute type that exists in the last-specified RecordID.
  1840.  
  1841. The client should return FALSE from eachRecordID, eachAttrType, and
  1842. eachAttrValue to continue processing of the LookupParse request.  Returning TRUE
  1843. from any call-back will terminate the LookupParse request.
  1844.  
  1845. If LookupGet has failed with kOCEMoreData error, LookupParse will check to make sure that
  1846. ForEachAttributeValueFunc has been called at least once. If so, the client has the option
  1847. to continue from that attribute CreationID (for PAB/ADAP) in the next LookupGet call.
  1848. However, if it was not even called once, then the attribute value may be too big to fit in the
  1849. user's buffer. In this case, lastAttrValueCID (lastAttribute) and attrSize are returned in the
  1850. parse buffer and the call will fail with kOCEMoreAttrValue. However, it is possible that
  1851. ForEachAttributeValue was not called because the user does not have read access to some of
  1852. the attributeTypes in the list, and the buffer was full before even reading the creationID of
  1853. any of the attribute values.  A kOCEMoreData error is returned.
  1854.  
  1855. For synchronous calls, the call-back routine actually runs as part of the same thread
  1856. of execution as the thread that made the LookupParse call.  That means that the
  1857. same low-memory globals, A5, stack, etc. are in effect during the call-back
  1858. that were in effect when the call was made.  Because of this, the call-back
  1859. routine has the same restrictions as the caller of LookupParse:
  1860. if LookupParse was not called from interrupt level, then the call-
  1861. back routine can allocate memory. For asynchronous calls, call-back routine is
  1862. like a ioCompletion except that A5 will be preserved for the application.
  1863. */
  1864.  
  1865. struct DirLookupParsePB {
  1866.     void *                            qLink;
  1867.     long                             reserved1;
  1868.     long                             reserved2;
  1869.     DirIOCompletionUPP                 ioCompletion;
  1870.     OSErr                             ioResult;
  1871.     unsigned long                     saveA5;
  1872.     short                             reqCode;
  1873.     long                             reserved[2];
  1874.     AddrBlock                         serverHint;
  1875.     short                             dsRefNum;
  1876.     unsigned long                     callID;
  1877.     AuthIdentity                     identity;
  1878.     long                             gReserved1;
  1879.     long                             gReserved2;
  1880.     long                             gReserved3;
  1881.     long                             clientData;
  1882.     RecordIDPtr *                    aRecordList;                /*  --> must be same from the corresponding Get call */
  1883.     AttributeTypePtr *                attrTypeList;                /*  --> must be same from the corresponding Get call */
  1884.     long                             cReserved;                    /*  --  */
  1885.     ForEachLookupRecordID             eachRecordID;                /*  --> */
  1886.     ForEachAttrTypeLookup             eachAttrType;                /*  --> */
  1887.     ForEachAttrValue                 eachAttrValue;                /*  --> */
  1888.     unsigned long                     recordIDCount;                /*  --> must be same from the corresponding Get call */
  1889.     unsigned long                     attrTypeCount;                /*  --> must be same from the corresponding Get call */
  1890.     long                             iReserved;                    /*  --  */
  1891.     void *                            getBuffer;                    /*  --> must be same from the corresponding Get call*/
  1892.     unsigned long                     getBufferSize;                /*  --> must be same from the corresponding Get call*/
  1893.     unsigned long                     lastRecordIndex;            /* <--  last RecordID processed when parse completed */
  1894.     unsigned long                     lastAttributeIndex;            /* <--  last Attribute Type processed when parse completed */
  1895.     Attribute                         lastAttribute;                /* <--  last attribute value (with this CreationID) processed when parse completed */
  1896.     unsigned long                     attrSize;                    /* <--  length of the attribute we did not return */
  1897. };
  1898. typedef struct DirLookupParsePB            DirLookupParsePB;
  1899.  
  1900.  
  1901. /* AddAttributeValue */
  1902.  
  1903. struct DirAddAttributeValuePB {
  1904.     void *                            qLink;
  1905.     long                             reserved1;
  1906.     long                             reserved2;
  1907.     DirIOCompletionUPP                 ioCompletion;
  1908.     OSErr                             ioResult;
  1909.     unsigned long                     saveA5;
  1910.     short                             reqCode;
  1911.     long                             reserved[2];
  1912.     AddrBlock                         serverHint;
  1913.     short                             dsRefNum;
  1914.     unsigned long                     callID;
  1915.     AuthIdentity                     identity;
  1916.     long                             gReserved1;
  1917.     long                             gReserved2;
  1918.     long                             gReserved3;
  1919.     long                             clientData;
  1920.     RecordIDPtr                     aRecord;                    /*  --> */
  1921.     AttributePtr                     attr;                        /*  --> AttributeCreationID returned here */
  1922. };
  1923. typedef struct DirAddAttributeValuePB    DirAddAttributeValuePB;
  1924. /*
  1925. aRecord must contain valid PackedRLI and a CreationID.
  1926.  
  1927. Instead of passing type, length, and value in three separate
  1928. fields, we take a pointer to an Attribute structure that contains
  1929. all three, and has room for the AttributeCreationNumber.
  1930. The AttributeCreationID will be returned in the attr itself.
  1931.  
  1932. The AttributeTag tells the catalog service that the attribute is an RString,
  1933. binary, or a RecordID.
  1934. */
  1935. /*
  1936. DeleteAttributeType:
  1937. This call is provided so that an existing AttributeType can be deleted.
  1938. If any attribute values exist for this type, they will all be deleted
  1939. (if the user has access rights to delete the values) and then the attribute type
  1940. will be deleted. Otherwise dsAccessDenied error will be returned.
  1941. */
  1942.  
  1943. struct DirDeleteAttributeTypePB {
  1944.     void *                            qLink;
  1945.     long                             reserved1;
  1946.     long                             reserved2;
  1947.     DirIOCompletionUPP                 ioCompletion;
  1948.     OSErr                             ioResult;
  1949.     unsigned long                     saveA5;
  1950.     short                             reqCode;
  1951.     long                             reserved[2];
  1952.     AddrBlock                         serverHint;
  1953.     short                             dsRefNum;
  1954.     unsigned long                     callID;
  1955.     AuthIdentity                     identity;
  1956.     long                             gReserved1;
  1957.     long                             gReserved2;
  1958.     long                             gReserved3;
  1959.     long                             clientData;
  1960.     RecordIDPtr                     aRecord;                    /*  --> */
  1961.     AttributeTypePtr                 attrType;                    /*  --> */
  1962. };
  1963. typedef struct DirDeleteAttributeTypePB    DirDeleteAttributeTypePB;
  1964. /*
  1965.     DeleteAttributeValue
  1966. */
  1967.  
  1968. struct DirDeleteAttributeValuePB {
  1969.     void *                            qLink;
  1970.     long                             reserved1;
  1971.     long                             reserved2;
  1972.     DirIOCompletionUPP                 ioCompletion;
  1973.     OSErr                             ioResult;
  1974.     unsigned long                     saveA5;
  1975.     short                             reqCode;
  1976.     long                             reserved[2];
  1977.     AddrBlock                         serverHint;
  1978.     short                             dsRefNum;
  1979.     unsigned long                     callID;
  1980.     AuthIdentity                     identity;
  1981.     long                             gReserved1;
  1982.     long                             gReserved2;
  1983.     long                             gReserved3;
  1984.     long                             clientData;
  1985.     RecordIDPtr                     aRecord;                    /*  -> */
  1986.     AttributePtr                     attr;                        /*  -> */
  1987. };
  1988. typedef struct DirDeleteAttributeValuePB DirDeleteAttributeValuePB;
  1989.  
  1990.  
  1991. /*
  1992.     ChangeAttributeValue:
  1993.     currentAttr ==> the attribute to be changed. For ADAS and PAB CreationID is
  1994.                     sufficient
  1995.     newAttr     ==> new value for the attribute. For ADAS and PAB 
  1996.                     CreationID field will be set when
  1997.                     the call succeesfully completes
  1998.     
  1999.     aRecord     ==> must contain valid PackedRecordLocationInfo and a CreationID.
  2000.  
  2001.  
  2002.     
  2003. */
  2004.  
  2005. struct DirChangeAttributeValuePB {
  2006.     void *                            qLink;
  2007.     long                             reserved1;
  2008.     long                             reserved2;
  2009.     DirIOCompletionUPP                 ioCompletion;
  2010.     OSErr                             ioResult;
  2011.     unsigned long                     saveA5;
  2012.     short                             reqCode;
  2013.     long                             reserved[2];
  2014.     AddrBlock                         serverHint;
  2015.     short                             dsRefNum;
  2016.     unsigned long                     callID;
  2017.     AuthIdentity                     identity;
  2018.     long                             gReserved1;
  2019.     long                             gReserved2;
  2020.     long                             gReserved3;
  2021.     long                             clientData;
  2022.     RecordIDPtr                     aRecord;                    /*  -> */
  2023.     AttributePtr                     currentAttr;                /*  -> */
  2024.     AttributePtr                     newAttr;                    /*  -> */
  2025. };
  2026. typedef struct DirChangeAttributeValuePB DirChangeAttributeValuePB;
  2027.  
  2028. /* VerifyAttributeValue */
  2029.  
  2030. struct DirVerifyAttributeValuePB {
  2031.     void *                            qLink;
  2032.     long                             reserved1;
  2033.     long                             reserved2;
  2034.     DirIOCompletionUPP                 ioCompletion;
  2035.     OSErr                             ioResult;
  2036.     unsigned long                     saveA5;
  2037.     short                             reqCode;
  2038.     long                             reserved[2];
  2039.     AddrBlock                         serverHint;
  2040.     short                             dsRefNum;
  2041.     unsigned long                     callID;
  2042.     AuthIdentity                     identity;
  2043.     long                             gReserved1;
  2044.     long                             gReserved2;
  2045.     long                             gReserved3;
  2046.     long                             clientData;
  2047.     RecordIDPtr                     aRecord;                    /*  --> */
  2048.     AttributePtr                     attr;                        /*  --> */
  2049. };
  2050. typedef struct DirVerifyAttributeValuePB DirVerifyAttributeValuePB;
  2051. /*
  2052. aRecord must contain valid PackedRLI and a CreationID.
  2053.  
  2054. The attribute type and value are passed in the attribute structure.  If the
  2055. attribute CreationID is non-zero, the server will verify that an attribute with
  2056. the specified value and creation number exists in aRecord.  If the attribute
  2057. CreationID is zero, the server will verify the attribute by type and value
  2058. alone, and return the attribute CreationID in the Attribute struct if the
  2059. attribute exists.
  2060. */
  2061.  
  2062. /*
  2063. EnumerateAttributeTypesGet:
  2064. The following two calls can be used to enumerate the attribute types present in
  2065. a specified RecordID.  The first, EnumerateAttributeTypesGet, processes the request
  2066. and reads the response into getBuffer, as much as will fit.  A kOCEMoreData error will
  2067. be returned if the buffer was not large enough.  After this call completes, the
  2068. client can call EnumerateAttributeTypesParse (see below).
  2069.  
  2070. The user will able to continue from a startingPoint by setting a startingAttrType.
  2071. Typically, this should be the last value returned in EnumerateAttributeTypesParse call
  2072. when 'kOCEMoreData' is returned.
  2073.  
  2074. If 'includeStartingPoint' is true when a 'startingAttrType' is specified, the starting value
  2075. will be included in the results, if it exists. If this is set to false, this value will not
  2076. be included. AttributeTypes following this type will be returned.
  2077. */
  2078.  
  2079. struct DirEnumerateAttributeTypesGetPB {
  2080.     void *                            qLink;
  2081.     long                             reserved1;
  2082.     long                             reserved2;
  2083.     DirIOCompletionUPP                 ioCompletion;
  2084.     OSErr                             ioResult;
  2085.     unsigned long                     saveA5;
  2086.     short                             reqCode;
  2087.     long                             reserved[2];
  2088.     AddrBlock                         serverHint;
  2089.     short                             dsRefNum;
  2090.     unsigned long                     callID;
  2091.     AuthIdentity                     identity;
  2092.     long                             gReserved1;
  2093.     long                             gReserved2;
  2094.     long                             gReserved3;
  2095.     long                             clientData;
  2096.     RecordIDPtr                     aRecord;                    /*  --> */
  2097.     AttributeTypePtr                 startingAttrType;            /*  --> starting point */
  2098.     long                             cReserved;                    /*  --  */
  2099.     long                             dReserved;                    /*  --  */
  2100.     long                             eReserved;                    /*  --  */
  2101.     long                             fReserved;                    /*  --  */
  2102.     long                             gReserved;                    /*  --  */
  2103.     long                             hReserved;                    /*  --  */
  2104.     Boolean                         includeStartingPoint;        /*  --> if true return the attrType specified by starting point */
  2105.     Byte                             padByte;
  2106.     short                             i1Reserved;                    /*  --  */
  2107.     void *                            getBuffer;                    /*  --> */
  2108.     unsigned long                     getBufferSize;                /*  --> */
  2109. };
  2110. typedef struct DirEnumerateAttributeTypesGetPB DirEnumerateAttributeTypesGetPB;
  2111. /* The call-back function is defined as follows: */
  2112. typedef CALLBACK_API( Boolean , ForEachAttrTypeProcPtr )(long clientData, const AttributeType *attrType);
  2113. typedef STACK_UPP_TYPE(ForEachAttrTypeProcPtr)                     ForEachAttrTypeUPP;
  2114.  
  2115. typedef ForEachAttrTypeUPP                 ForEachAttrType;
  2116. /*
  2117. EnumerateAttributeTypesParse:
  2118. After an EnumerateAttributeTypesGet call has completed, call EnumerateAttributeTypesParse
  2119. to parse through the buffer that was filled in EnumerateAttributeTypesGet.  The
  2120. toolbox will parse through the buffer and call the call-back routine for
  2121. each attribute type in the getBuffer.
  2122.  
  2123. The client should return false from eachAttrType to continue
  2124. processing of the EnumerateAttributeTypesParse request.  Returning true will
  2125. terminate the EnumerateAttributeTypesParse request.  The clientData parameter that
  2126. you pass in the parameter block will be passed to eachAttrType.
  2127. You are free to put anything in clientData - it is intended to allow
  2128. you some way to match the call-back to the original call (in case, for
  2129. example, you make simultaneous asynchronous calls).
  2130.  
  2131. For synchronous calls, the call-back routine actually runs as part of the same thread
  2132. of execution as the thread that made the EnumerateAttributeTypesParse call.  That means that the
  2133. same low-memory globals, A5, stack, etc. are in effect during the call-back
  2134. that were in effect when the call was made.  Because of this, the call-back
  2135. routine has the same restrictions as the caller of EnumerateAttributeTypesParse.
  2136. If EnumerateAttributeTypesParse was not called from interrupt level, then the call-
  2137. back routine can allocate memory. For asynchronous calls, call-back routine is
  2138. like a ioCompletion except that A5 will be preserved for the application.
  2139. */
  2140.  
  2141. struct DirEnumerateAttributeTypesParsePB {
  2142.     void *                            qLink;
  2143.     long                             reserved1;
  2144.     long                             reserved2;
  2145.     DirIOCompletionUPP                 ioCompletion;
  2146.     OSErr                             ioResult;
  2147.     unsigned long                     saveA5;
  2148.     short                             reqCode;
  2149.     long                             reserved[2];
  2150.     AddrBlock                         serverHint;
  2151.     short                             dsRefNum;
  2152.     unsigned long                     callID;
  2153.     AuthIdentity                     identity;
  2154.     long                             gReserved1;
  2155.     long                             gReserved2;
  2156.     long                             gReserved3;
  2157.     long                             clientData;
  2158.     RecordIDPtr                     aRecord;                    /*  --> Same as DirEnumerateAttributeTypesGetPB */
  2159.     long                             bReserved;                    /*  --  */
  2160.     long                             cReserved;                    /*  --  */
  2161.     long                             dReserved;                    /*  --  */
  2162.     ForEachAttrType                 eachAttrType;                /*  --> */
  2163.     long                             fReserved;                    /*  --  */
  2164.     long                             gReserved;                    /*  --  */
  2165.     long                             hReserved;                    /*  --  */
  2166.     long                             iReserved;                    /*  --  */
  2167.     void *                            getBuffer;                    /*  --> */
  2168.     unsigned long                     getBufferSize;                /*  --> */
  2169. };
  2170. typedef struct DirEnumerateAttributeTypesParsePB DirEnumerateAttributeTypesParsePB;
  2171. /*
  2172. DirAbort:
  2173. With this call a user will able to abort an outstanding catalog service call.
  2174. A user must pass a pointer to the parameter block for the outstanding call.
  2175. In the current version of the product, the toolbox will process this call
  2176. for NetSearchADAPDirectoriesGet or FindADAPDirectoryByNetSearch calls and if possible
  2177. it will abort. For other calls for ADAP and PAB this will return 'daAbortFailErr'.
  2178. For CSAM catalogs, this call will be passed to the corresponding CSAM driver.
  2179. The CSAM driver may process this call or may return 'daAbortFailErr'. This call can
  2180. be called only in synchronous mode. Since the abort call makes references to fields in
  2181. the pb associated with the original call, this pb must not be disposed or or altered if
  2182. the original call completes before the abort call has completed.
  2183. */
  2184.  
  2185. struct DirAbortPB {
  2186.     void *                            qLink;
  2187.     long                             reserved1;
  2188.     long                             reserved2;
  2189.     DirIOCompletionUPP                 ioCompletion;
  2190.     OSErr                             ioResult;
  2191.     unsigned long                     saveA5;
  2192.     short                             reqCode;
  2193.     long                             reserved[2];
  2194.     AddrBlock                         serverHint;
  2195.     short                             dsRefNum;
  2196.     unsigned long                     callID;
  2197.     AuthIdentity                     identity;
  2198.     long                             gReserved1;
  2199.     long                             gReserved2;
  2200.     long                             gReserved3;
  2201.     long                             clientData;
  2202.     DirParamBlock *                    pb;                            /*  --> pb for the call which must be aborted */
  2203. };
  2204. typedef struct DirAbortPB                DirAbortPB;
  2205.  
  2206. /*
  2207. AddPseudonym:
  2208. An alternate name and type can be added to a given record. If allowDuplicate
  2209. is set the name and type will be added even if the same name and type already
  2210. exists.
  2211. */
  2212.  
  2213. struct DirAddPseudonymPB {
  2214.     void *                            qLink;
  2215.     long                             reserved1;
  2216.     long                             reserved2;
  2217.     DirIOCompletionUPP                 ioCompletion;
  2218.     OSErr                             ioResult;
  2219.     unsigned long                     saveA5;
  2220.     short                             reqCode;
  2221.     long                             reserved[2];
  2222.     AddrBlock                         serverHint;
  2223.     short                             dsRefNum;
  2224.     unsigned long                     callID;
  2225.     AuthIdentity                     identity;
  2226.     long                             gReserved1;
  2227.     long                             gReserved2;
  2228.     long                             gReserved3;
  2229.     long                             clientData;
  2230.     RecordIDPtr                     aRecord;                    /*  --> RecordID to which pseudonym is to be added */
  2231.     RStringPtr                         pseudonymName;                /*  --> new name to be added as pseudonym */
  2232.     RStringPtr                         pseudonymType;                /*  --> new name to be added as pseudonym */
  2233.     Boolean                         allowDuplicate;                /*  --> */
  2234.     Boolean                         filler1;
  2235. };
  2236. typedef struct DirAddPseudonymPB        DirAddPseudonymPB;
  2237. /*
  2238. DeletePseudonym:
  2239. An alternate name and type for a given record can be deleted.
  2240. */
  2241.  
  2242. struct DirDeletePseudonymPB {
  2243.     void *                            qLink;
  2244.     long                             reserved1;
  2245.     long                             reserved2;
  2246.     DirIOCompletionUPP                 ioCompletion;
  2247.     OSErr                             ioResult;
  2248.     unsigned long                     saveA5;
  2249.     short                             reqCode;
  2250.     long                             reserved[2];
  2251.     AddrBlock                         serverHint;
  2252.     short                             dsRefNum;
  2253.     unsigned long                     callID;
  2254.     AuthIdentity                     identity;
  2255.     long                             gReserved1;
  2256.     long                             gReserved2;
  2257.     long                             gReserved3;
  2258.     long                             clientData;
  2259.     RecordIDPtr                     aRecord;                    /*  --> RecordID to which pseudonym to be added */
  2260.     RStringPtr                         pseudonymName;                /*  --> pseudonymName to be deleted */
  2261.     RStringPtr                         pseudonymType;                /*  --> pseudonymType to be deleted */
  2262. };
  2263. typedef struct DirDeletePseudonymPB        DirDeletePseudonymPB;
  2264.  
  2265. /*
  2266.     AddAlias:
  2267.     This call can be used to create an alias  record. The alias
  2268.     can be created either in the same or different cluster. ADAS will not support
  2269.     this call for this release. A new catalog capability flag 'kSupportsAlias' will indicate
  2270.     if the catalog supports this call. PAB's will support this call. For the PAB implementation,
  2271.     this call will create a record with the name and type specified an aRecord.
  2272.     This call works exactly like AddRecord.
  2273.     If 'allowDuplicate' is false and another record with same name and type already exists
  2274.     'daNoDupAllowed' error will be returned.
  2275. */
  2276.  
  2277. struct DirAddAliasPB {
  2278.     void *                            qLink;
  2279.     long                             reserved1;
  2280.     long                             reserved2;
  2281.     DirIOCompletionUPP                 ioCompletion;
  2282.     OSErr                             ioResult;
  2283.     unsigned long                     saveA5;
  2284.     short                             reqCode;
  2285.     long                             reserved[2];
  2286.     AddrBlock                         serverHint;
  2287.     short                             dsRefNum;
  2288.     unsigned long                     callID;
  2289.     AuthIdentity                     identity;
  2290.     long                             gReserved1;
  2291.     long                             gReserved2;
  2292.     long                             gReserved3;
  2293.     long                             clientData;
  2294.     RecordIDPtr                     aRecord;                    /*  -> */
  2295.     Boolean                         allowDuplicate;                /*  -> */
  2296.     Boolean                         filler1;
  2297. };
  2298. typedef struct DirAddAliasPB            DirAddAliasPB;
  2299. /*
  2300. DirFindValue:
  2301. This call can be used to find the occurrence of a value. The value
  2302. to be matched is passed in the buffer 'matchingData' field. The current
  2303. ADAP/PAB implementation will match a maximum of 32 bytes of data.
  2304. For attribute values in the PAB/ADAP implementation, only the first 32 bytes will
  2305. be used for comparing the occurrence of data. Search can be restricted to
  2306. a particular record and/or attribute type by specifying 'aRecord' or 'aType'.
  2307. After finding one occurrence, 'startingRecord' and 'startingAttribute'
  2308. can be specified to find the next occurrence of the same value.
  2309. 'sortDirection' can be specified with starting values to search forward or backward.
  2310. When a matching value is found, the 'recordFound' indicates the reccordID in which the
  2311. data occurrence was found, 'attributeFound' indicates the attribute with in which the
  2312. matching data was found. ADAP/PAB implementation returns only the type and creationID of
  2313. attributes. Catalogs which don't support creationIDs may return the
  2314. complete value; hence this call may need a buffer to hold the data. For ADAP/PAB implementations
  2315. the user has to make a DirLookup call to get the actual data. 'recordFound' and
  2316. 'attributeFound' can be used to initialize 'startingRecord' and 'startingAttribute' to
  2317. find the next occurrence of the value.
  2318. */
  2319.  
  2320. struct DirFindValuePB {
  2321.     void *                            qLink;
  2322.     long                             reserved1;
  2323.     long                             reserved2;
  2324.     DirIOCompletionUPP                 ioCompletion;
  2325.     OSErr                             ioResult;
  2326.     unsigned long                     saveA5;
  2327.     short                             reqCode;
  2328.     long                             reserved[2];
  2329.     AddrBlock                         serverHint;
  2330.     short                             dsRefNum;
  2331.     unsigned long                     callID;
  2332.     AuthIdentity                     identity;
  2333.     long                             gReserved1;
  2334.     long                             gReserved2;
  2335.     long                             gReserved3;
  2336.     long                             clientData;
  2337.     PackedRLIPtr                     aRLI;                        /*  --> an RLI specifying the cluster to be enumerated */
  2338.     LocalRecordIDPtr                 aRecord;                    /*  --> if not nil, look only in this record */
  2339.     AttributeTypePtr                 attrType;                    /*  --> if not nil, look only in this attribute type */
  2340.     LocalRecordIDPtr                 startingRecord;                /*  --> record in which to start searching */
  2341.     AttributePtr                     startingAttribute;            /*  --> attribute in which to start searching */
  2342.     LocalRecordIDPtr                 recordFound;                /* <--  record in which data was found */
  2343.     Attribute                         attributeFound;                /* <--  attribute in which data was found */
  2344.     unsigned long                     matchSize;                    /*  --> length of matching bytes */
  2345.     void *                            matchingData;                /*  --> data bytes to be matched in search */
  2346.     DirSortDirection                 sortDirection;                /*  --> sort direction (forwards or backwards) */
  2347. };
  2348. typedef struct DirFindValuePB            DirFindValuePB;
  2349.  
  2350.  
  2351. /*
  2352. EnumeratePseudonymGet:
  2353. This call can be used to enumerate the existing pseudonyms for
  2354. a given record specified in 'aRecord'. A starting point can be specified
  2355. by 'startingName' and 'startingType'. If the 'includeStartingPoint' boolean
  2356. is true and a starting point is specified, the name specified by startingName
  2357. and startingType also is returned in the results, if it exists. If this is set to false,
  2358. the pseudonym in startingName and Type is not included.
  2359. Pseudonyms returned in the 'getBuffer' can be extracted by making an
  2360. EnumeratePseudonymParse call. The results will consist of a RecordID with the
  2361. name and type of the pseudonym. If the buffer could not hold all the results, then
  2362. 'kOCEMoreData' error will be returned. The user will be able to continue the call by
  2363. using the last result returned as starting point for the next call.
  2364. */
  2365.  
  2366. struct DirEnumeratePseudonymGetPB {
  2367.     void *                            qLink;
  2368.     long                             reserved1;
  2369.     long                             reserved2;
  2370.     DirIOCompletionUPP                 ioCompletion;
  2371.     OSErr                             ioResult;
  2372.     unsigned long                     saveA5;
  2373.     short                             reqCode;
  2374.     long                             reserved[2];
  2375.     AddrBlock                         serverHint;
  2376.     short                             dsRefNum;
  2377.     unsigned long                     callID;
  2378.     AuthIdentity                     identity;
  2379.     long                             gReserved1;
  2380.     long                             gReserved2;
  2381.     long                             gReserved3;
  2382.     long                             clientData;
  2383.     RecordIDPtr                     aRecord;                    /*  --> */
  2384.     RStringPtr                         startingName;                /*  --> */
  2385.     RStringPtr                         startingType;                /*  --> */
  2386.     long                             dReserved;                    /*  --  */
  2387.     long                             eReserved;                    /*  --  */
  2388.     long                             fReserved;                    /*  --  */
  2389.     long                             gReserved;                    /*  --  */
  2390.     long                             hReserved;                    /*  --  */
  2391.     Boolean                         includeStartingPoint;        /*  --> if true return the Pseudonym specified by starting point will be included */
  2392.     Byte                             padByte;
  2393.     short                             i1Reserved;                    /*  --  */
  2394.     void *                            getBuffer;                    /*  --> */
  2395.     unsigned long                     getBufferSize;                /*  --> */
  2396. };
  2397. typedef struct DirEnumeratePseudonymGetPB DirEnumeratePseudonymGetPB;
  2398. /* The call-back function is defined as follows: */
  2399. typedef CALLBACK_API( Boolean , ForEachRecordIDProcPtr )(long clientData, const RecordID *recordID);
  2400. typedef STACK_UPP_TYPE(ForEachRecordIDProcPtr)                     ForEachRecordIDUPP;
  2401.  
  2402. typedef ForEachRecordIDUPP                 ForEachRecordID;
  2403. /*
  2404. EnumeratePseudonymParse:
  2405. The pseudonyms returned in the 'getBuffer' from the EnumeratePseudonymGet call
  2406. can be extracted by using the EnumeratePseudonymParse call. 'eachRecordID'
  2407. will be called for each pseudonym.
  2408.  
  2409. Returning true from any call-back will terminate the EnumeratePseudonymParse call.
  2410.  
  2411. For synchronous calls, the call-back routine actually runs as part of the same thread
  2412. of execution as the thread that made the EnumeratePseudonymParse call.  That means that the
  2413. same low-memory globals, A5, stack, etc. are in effect during the call-back
  2414. that were in effect when the call was made.  Because of this, the call-back
  2415. routine has the same restrictions as the caller of EnumeratePseudonymParse:
  2416. if EnumeratePseudonymParse was not called from interrupt level, then the call-
  2417. back routine can allocate memory. For asynchronous calls, call-back routine is
  2418. like a ioCompletion except that A5 will be preserved for the application.
  2419. */
  2420.  
  2421. struct DirEnumeratePseudonymParsePB {
  2422.     void *                            qLink;
  2423.     long                             reserved1;
  2424.     long                             reserved2;
  2425.     DirIOCompletionUPP                 ioCompletion;
  2426.     OSErr                             ioResult;
  2427.     unsigned long                     saveA5;
  2428.     short                             reqCode;
  2429.     long                             reserved[2];
  2430.     AddrBlock                         serverHint;
  2431.     short                             dsRefNum;
  2432.     unsigned long                     callID;
  2433.     AuthIdentity                     identity;
  2434.     long                             gReserved1;
  2435.     long                             gReserved2;
  2436.     long                             gReserved3;
  2437.     long                             clientData;
  2438.     RecordIDPtr                     aRecord;                    /*  --> same as DirEnumerateAliasesGetPB */
  2439.     long                             bReserved;                    /*  --  */
  2440.     long                             cReserved;                    /*  --  */
  2441.     ForEachRecordID                 eachRecordID;                /*  --> */
  2442.     long                             eReserved;                    /*  --  */
  2443.     long                             fReserved;                    /*  --  */
  2444.     long                             gReserved;                    /*  --  */
  2445.     long                             hReserved;                    /*  --  */
  2446.     long                             iReserved;                    /*  --  */
  2447.     void *                            getBuffer;                    /*  --> */
  2448.     unsigned long                     getBufferSize;                /*  --> */
  2449. };
  2450. typedef struct DirEnumeratePseudonymParsePB DirEnumeratePseudonymParsePB;
  2451.  
  2452.  
  2453. /* GetNameAndType */
  2454.  
  2455. struct DirGetNameAndTypePB {
  2456.     void *                            qLink;
  2457.     long                             reserved1;
  2458.     long                             reserved2;
  2459.     DirIOCompletionUPP                 ioCompletion;
  2460.     OSErr                             ioResult;
  2461.     unsigned long                     saveA5;
  2462.     short                             reqCode;
  2463.     long                             reserved[2];
  2464.     AddrBlock                         serverHint;
  2465.     short                             dsRefNum;
  2466.     unsigned long                     callID;
  2467.     AuthIdentity                     identity;
  2468.     long                             gReserved1;
  2469.     long                             gReserved2;
  2470.     long                             gReserved3;
  2471.     long                             clientData;
  2472.     RecordIDPtr                     aRecord;                    /*  --> */
  2473. };
  2474. typedef struct DirGetNameAndTypePB        DirGetNameAndTypePB;
  2475. /*
  2476. aRecord must contain valid RLI and a CreationID.  It
  2477. must also contain pointers to maximum-length RStrings (name and type fields)
  2478. in which will be returned the record's distinguished name and type.
  2479. */
  2480.  
  2481. /*
  2482. SetNameAndType:
  2483. This call can be used to change a name and type for a record. The record
  2484. to be renamed is specified using 'aRecord'.
  2485. 'newName' and 'newType' indicate the name and type to be set.
  2486. 'allowDuplicate' if true indicates that name is to be set even if another
  2487. name and type exactly matches the newName and newType specified.
  2488.  
  2489. 'newName' and 'newType' are required since the catalogs not supporting
  2490. CreationID require name and type fields in the recordID to identify a given
  2491. record.
  2492. */
  2493.  
  2494. struct DirSetNameAndTypePB {
  2495.     void *                            qLink;
  2496.     long                             reserved1;
  2497.     long                             reserved2;
  2498.     DirIOCompletionUPP                 ioCompletion;
  2499.     OSErr                             ioResult;
  2500.     unsigned long                     saveA5;
  2501.     short                             reqCode;
  2502.     long                             reserved[2];
  2503.     AddrBlock                         serverHint;
  2504.     short                             dsRefNum;
  2505.     unsigned long                     callID;
  2506.     AuthIdentity                     identity;
  2507.     long                             gReserved1;
  2508.     long                             gReserved2;
  2509.     long                             gReserved3;
  2510.     long                             clientData;
  2511.     RecordIDPtr                     aRecord;                    /*  --> */
  2512.     Boolean                         allowDuplicate;                /*  --> */
  2513.     Byte                             padByte;
  2514.     RStringPtr                         newName;                    /*  --> new name for the record */
  2515.     RStringPtr                         newType;                    /*  --> new type for the record */
  2516. };
  2517. typedef struct DirSetNameAndTypePB        DirSetNameAndTypePB;
  2518.  
  2519.  
  2520.  
  2521. /*
  2522. DirGetMetaRecordInfo: This call can be made to obtain
  2523. the MetaRecordInfo for a given record. Information returned
  2524. is 16 bytes of OPAQUE information about the record.
  2525. */
  2526.  
  2527. struct DirGetRecordMetaInfoPB {
  2528.     void *                            qLink;
  2529.     long                             reserved1;
  2530.     long                             reserved2;
  2531.     DirIOCompletionUPP                 ioCompletion;
  2532.     OSErr                             ioResult;
  2533.     unsigned long                     saveA5;
  2534.     short                             reqCode;
  2535.     long                             reserved[2];
  2536.     AddrBlock                         serverHint;
  2537.     short                             dsRefNum;
  2538.     unsigned long                     callID;
  2539.     AuthIdentity                     identity;
  2540.     long                             gReserved1;
  2541.     long                             gReserved2;
  2542.     long                             gReserved3;
  2543.     long                             clientData;
  2544.     RecordIDPtr                     aRecord;                    /*  --> */
  2545.     DirMetaInfo                     metaInfo;                    /* <--  */
  2546. };
  2547. typedef struct DirGetRecordMetaInfoPB    DirGetRecordMetaInfoPB;
  2548.  
  2549. /*
  2550. DirGetDNodeMetaInfo: This call can be made to obtain
  2551. the DNodeMetaInfo for a given Packed RLI. Information returned
  2552. is 16 bytes of OPAQUE information about the DNode.
  2553. */
  2554.  
  2555. struct DirGetDNodeMetaInfoPB {
  2556.     void *                            qLink;
  2557.     long                             reserved1;
  2558.     long                             reserved2;
  2559.     DirIOCompletionUPP                 ioCompletion;
  2560.     OSErr                             ioResult;
  2561.     unsigned long                     saveA5;
  2562.     short                             reqCode;
  2563.     long                             reserved[2];
  2564.     AddrBlock                         serverHint;
  2565.     short                             dsRefNum;
  2566.     unsigned long                     callID;
  2567.     AuthIdentity                     identity;
  2568.     long                             gReserved1;
  2569.     long                             gReserved2;
  2570.     long                             gReserved3;
  2571.     long                             clientData;
  2572.     PackedRLIPtr                     pRLI;                        /*  --> */
  2573.     DirMetaInfo                     metaInfo;                    /* <--  */
  2574. };
  2575. typedef struct DirGetDNodeMetaInfoPB    DirGetDNodeMetaInfoPB;
  2576.  
  2577. /*
  2578. EnumerateDirectoriesGet:
  2579. A user can enumerate all the catalogs installed. This includes installed
  2580. ADAP and CSAM catalogs. The user can specify a signature as input to restrict
  2581. the results. kDirADAPKind will return only ADAP catalogs, kDirDSAMKind
  2582. will return all CSAM catalogs. kDirAllKinds will get both ADAP & CSAM catalogs.
  2583. A specific signature (e.g. X.500) may be used to get catalogs with an X.500 signature.
  2584. The information for each catalog returned will have directoryName, discriminator and features.
  2585.  
  2586. If the user receives 'noErr' or 'kOCEMoreData', the buffer will contain valid results. A user
  2587. can extract the results in the 'getBuffer' by making an DirEnumerateDirectories call.
  2588.  
  2589. If 'kOCEMoreData' is received, the user can continue enumeration by using the last catalog and
  2590. discriminator as startingDirectoryName and staringDirDiscriminator in the next call.
  2591.  
  2592. If 'includeStartingPoint' is true and a starting point is specified,
  2593. the staring point will be returned in the result. If false, it is not included.
  2594. */
  2595.  
  2596. struct DirEnumerateDirectoriesGetPB {
  2597.     void *                            qLink;
  2598.     long                             reserved1;
  2599.     long                             reserved2;
  2600.     DirIOCompletionUPP                 ioCompletion;
  2601.     OSErr                             ioResult;
  2602.     unsigned long                     saveA5;
  2603.     short                             reqCode;
  2604.     long                             reserved[2];
  2605.     AddrBlock                         serverHint;
  2606.     short                             dsRefNum;
  2607.     unsigned long                     callID;
  2608.     AuthIdentity                     identity;
  2609.     long                             gReserved1;
  2610.     long                             gReserved2;
  2611.     long                             gReserved3;
  2612.     long                             clientData;
  2613.     OCEDirectoryKind                 directoryKind;                /*  --> enumerate catalogs bearing this signature */
  2614.     DirectoryNamePtr                 startingDirectoryName;        /*  --> staring catalog name */
  2615.     DirDiscriminator                 startingDirDiscriminator;    /*  --> staring catalog discriminator */
  2616.     long                             eReserved;                    /*  --  */
  2617.     long                             fReserved;                    /*  --  */
  2618.     long                             gReserved;                    /*  --  */
  2619.     long                             hReserved;                    /*  --  */
  2620.     Boolean                         includeStartingPoint;        /*  --> if true return the catalog specified by starting point */
  2621.     Byte                             padByte;
  2622.     short                             i1Reserved;                    /*  --  */
  2623.     void *                            getBuffer;                    /*  --> */
  2624.     unsigned long                     getBufferSize;                /*  --> */
  2625. };
  2626. typedef struct DirEnumerateDirectoriesGetPB DirEnumerateDirectoriesGetPB;
  2627.  
  2628.  
  2629. typedef CALLBACK_API( Boolean , ForEachDirectoryProcPtr )(long clientData, const DirectoryName *dirName, const DirDiscriminator *discriminator, DirGestalt features);
  2630. typedef STACK_UPP_TYPE(ForEachDirectoryProcPtr)                 ForEachDirectoryUPP;
  2631.  
  2632. typedef ForEachDirectoryUPP             ForEachDirectory;
  2633. /*
  2634. EnumerateDirectoriesParse:
  2635. The catalog info returned in 'getBuffer' from the EnumerateDirectoriesGet call
  2636. can be extracted using the EnumerateDirectoriesParse call. 'eachDirectory' will
  2637. be called for each catalog.
  2638.  
  2639. Returning true from any call-back will terminate the EnumerateDirectoriesParse call.
  2640.  
  2641. For synchronous calls, the call-back routine actually runs as part of the same thread
  2642. of execution as the thread that made the EnumerateDirectoriesParse call.  That means that the
  2643. same low-memory globals, A5, stack, etc. are in effect during the call-back
  2644. that were in effect when the call was made.  Because of this, the call-back
  2645. routine has the same restrictions as the caller of EnumerateDirectoriesParse:
  2646. if EnumerateDirectoriesParse was not called from interrupt level, then the call-
  2647. back routine can allocate memory. For asynchronous calls, call-back routine is
  2648. like a ioCompletion except that A5 will be preserved for the application.
  2649.  
  2650. eachDirectory will be called each time to return to the client a
  2651. DirectoryName, DirDiscriminator, and features for that catalog.
  2652. */
  2653.  
  2654. struct DirEnumerateDirectoriesParsePB {
  2655.     void *                            qLink;
  2656.     long                             reserved1;
  2657.     long                             reserved2;
  2658.     DirIOCompletionUPP                 ioCompletion;
  2659.     OSErr                             ioResult;
  2660.     unsigned long                     saveA5;
  2661.     short                             reqCode;
  2662.     long                             reserved[2];
  2663.     AddrBlock                         serverHint;
  2664.     short                             dsRefNum;
  2665.     unsigned long                     callID;
  2666.     AuthIdentity                     identity;
  2667.     long                             gReserved1;
  2668.     long                             gReserved2;
  2669.     long                             gReserved3;
  2670.     long                             clientData;
  2671.     long                             aReserved;                    /*  --  */
  2672.     long                             bReserved;                    /*  --  */
  2673.     long                             cReserved;                    /*  --  */
  2674.     long                             dReserved;                    /*  --  */
  2675.     ForEachDirectory                 eachDirectory;                /*  --> */
  2676.     long                             fReserved;                    /*  --  */
  2677.     long                             gReserved;                    /*  --  */
  2678.     long                             hReserved;                    /*  --  */
  2679.     long                             iReserved;                    /*  --  */
  2680.     void *                            getBuffer;                    /*  --> */
  2681.     unsigned long                     getBufferSize;                /*  --> */
  2682. };
  2683. typedef struct DirEnumerateDirectoriesParsePB DirEnumerateDirectoriesParsePB;
  2684.  
  2685. /*
  2686. The Following five call are specific to ADAP Catalogs. Toolbox
  2687. remembers a list of catalogs across boots. If any catalog service
  2688. call is intended for a ADAP catalog, then it must be in the list.
  2689. In order for managing this list, A client (Probably DE will use these
  2690. calls.
  2691. DirAddADAPDirectoryPB: Add a new ADAP catalog to the list.
  2692. DirRemoveADAPDirectory: Remove a ADAP catalog from the list.
  2693. DirNetSearchADAPDirectoriesGet:   search an internet for adas catalogs.
  2694. DirNetSearchADAPDirectoriesParse: extract the results obtained NetSearchADAPDirectoriesGet.
  2695. DirFindADAPDirectoryByNetSearch: Find a specified catalog through net search.
  2696. */
  2697. /*
  2698. NetSearchADAPDirectoriesGet:
  2699. This call can be used to make a network wide search for finding ADAP catalogs.
  2700. This call will be supported only by 'ADAP' and involve highly expensive
  2701. network operations, so the user is advised to use utmost discretion before
  2702. making this call. The results will be collected in the 'getbuffer' and can be
  2703. extracted using NetSearchADAPDirectoriesParse call. The directoryName,
  2704. the directoryDiscriminator, features and serverHint (AppleTalk address for
  2705. a PathFinder serving that catalog) are collected for each catalog found
  2706. on the network. If buffer is too small to hold all the catalogs found on
  2707. the network, a 'kOCEMoreData' error will be returned.
  2708. */
  2709.  
  2710. struct DirNetSearchADAPDirectoriesGetPB {
  2711.     void *                            qLink;
  2712.     long                             reserved1;
  2713.     long                             reserved2;
  2714.     DirIOCompletionUPP                 ioCompletion;
  2715.     OSErr                             ioResult;
  2716.     unsigned long                     saveA5;
  2717.     short                             reqCode;
  2718.     long                             reserved[2];
  2719.     AddrBlock                         serverHint;
  2720.     short                             dsRefNum;
  2721.     unsigned long                     callID;
  2722.     AuthIdentity                     identity;
  2723.     long                             gReserved1;
  2724.     long                             gReserved2;
  2725.     long                             gReserved3;
  2726.     long                             clientData;
  2727.     void *                            getBuffer;                    /*  --> */
  2728.     unsigned long                     getBufferSize;                /*  --> */
  2729.     long                             cReserved;                    /*  --  */
  2730. };
  2731. typedef struct DirNetSearchADAPDirectoriesGetPB DirNetSearchADAPDirectoriesGetPB;
  2732. typedef CALLBACK_API( Boolean , ForEachADAPDirectoryProcPtr )(long clientData, const DirectoryName *dirName, const DirDiscriminator *discriminator, DirGestalt features, AddrBlock serverHint);
  2733. typedef STACK_UPP_TYPE(ForEachADAPDirectoryProcPtr)             ForEachADAPDirectoryUPP;
  2734.  
  2735. typedef ForEachADAPDirectoryUPP         ForEachADAPDirectory;
  2736. /*
  2737. DirNetSearchADAPDirectoriesParse:
  2738. This call can be used to extract the results obtained in the 'getBuffer'.
  2739. The directoryName, directoryDiscriminator, features and
  2740. serverHint (AppleTalk address for a PathFinder serving that catalog) are
  2741. returned in each call-back. These values may be used to make an
  2742. AddADAPDirectory call.
  2743.  
  2744. Returning TRUE from any call-back will terminate the NetSearchADAPDirectoriesParse request.
  2745.  
  2746. For synchronous calls, the call-back routine actually runs as part of the same thread
  2747. of execution as the thread that made the DirNetSearchADAPDirectoriesParse call. That means that the
  2748. same low-memory globals, A5, stack, etc. are in effect during the call-back
  2749. that were in effect when the call was made.  Because of this, the call-back
  2750. routine has the same restrictions as the caller of DirNetSearchADAPDirectoriesParse:
  2751. if DirNetSearchADAPDirectoriesParse was not called from interrupt level, then the call-
  2752. back routine can allocate memory. For asynchronous calls, call-back routine is
  2753. like a ioCompletion except that A5 will be preserved for the application.
  2754. */
  2755.  
  2756. struct DirNetSearchADAPDirectoriesParsePB {
  2757.     void *                            qLink;
  2758.     long                             reserved1;
  2759.     long                             reserved2;
  2760.     DirIOCompletionUPP                 ioCompletion;
  2761.     OSErr                             ioResult;
  2762.     unsigned long                     saveA5;
  2763.     short                             reqCode;
  2764.     long                             reserved[2];
  2765.     AddrBlock                         serverHint;
  2766.     short                             dsRefNum;
  2767.     unsigned long                     callID;
  2768.     AuthIdentity                     identity;
  2769.     long                             gReserved1;
  2770.     long                             gReserved2;
  2771.     long                             gReserved3;
  2772.     long                             clientData;
  2773.     void *                            getBuffer;                    /*  --> */
  2774.     unsigned long                     getBufferSize;                /*  --> */
  2775.     ForEachADAPDirectory             eachADAPDirectory;            /*  --> */
  2776. };
  2777. typedef struct DirNetSearchADAPDirectoriesParsePB DirNetSearchADAPDirectoriesParsePB;
  2778. /*
  2779. DirFindADAPDirectoryByNetSearch:
  2780. This call can be used to make a network wide search to find an ADAP catalog.
  2781. This call will be supported only by 'ADAP' and involves highly expensive
  2782. network operations, so the user is advised to use utmost discretion before
  2783. making this call. The catalog is specified using directoryName and discriminator.
  2784. If 'addToOCESetup' is true, the catalog will be automatically added to the setup
  2785. list and will be visible through the EnumerateDirectories call and also
  2786. also a creationID to the directoryRecord will be returned.
  2787. If this parameter is set to 'false', the catalog will be added to temporary list
  2788. and will be available for making other catalog service calls. The catalogs
  2789. which are not in the preference catalog list will not be visible through the
  2790. EnumerateDirectories call.
  2791. */
  2792.  
  2793. struct DirFindADAPDirectoryByNetSearchPB {
  2794.     void *                            qLink;
  2795.     long                             reserved1;
  2796.     long                             reserved2;
  2797.     DirIOCompletionUPP                 ioCompletion;
  2798.     OSErr                             ioResult;
  2799.     unsigned long                     saveA5;
  2800.     short                             reqCode;
  2801.     long                             reserved[2];
  2802.     AddrBlock                         serverHint;
  2803.     short                             dsRefNum;
  2804.     unsigned long                     callID;
  2805.     AuthIdentity                     identity;
  2806.     long                             gReserved1;
  2807.     long                             gReserved2;
  2808.     long                             gReserved3;
  2809.     long                             clientData;
  2810.     DirectoryNamePtr                 directoryName;                /*  --> catalog name */
  2811.     DirDiscriminator                 discriminator;                /*  --> discriminate between dup catalog names */
  2812.     Boolean                         addToOCESetup;                /*  --> add this catalog to OCE Setup List */
  2813.     Byte                             padByte;
  2814.     CreationID                         directoryRecordCID;            /* <--  creationID for the catalog record */
  2815. };
  2816. typedef struct DirFindADAPDirectoryByNetSearchPB DirFindADAPDirectoryByNetSearchPB;
  2817.  
  2818. /*
  2819. DirAddADAPDirectory:
  2820. The catalog specified by 'directoryName' and 'discriminator' will be
  2821. added to the list of catalogs maintained by the Toolbox. Once added,
  2822. the catalog is available across boots, until the catalog is removed
  2823. explicitly through a DirRemoveADAPDirectory call.
  2824. If 'serverHint' is not nil, the address provided will be used
  2825. to contact a PathFinder for the catalog specified.
  2826. If 'serverHint' is nil or does not point to a valid PathFinder server
  2827. for that catalog, this call will fail.
  2828. If 'addToOCESetup' is true, the catalog will be automatically added to the setup
  2829. catalog list and will be visible through EnumerateDirectories calls and
  2830. also a creationID to the directoryRecord will be returned.
  2831. If this parameter is set to 'false', catalog will be added to temprary list
  2832. and will be available for making other catalog service calls. The catalogs
  2833. which are not in the setup  list will not be visible through
  2834. EnumerateDirectories call.
  2835. */
  2836.  
  2837. struct DirAddADAPDirectoryPB {
  2838.     void *                            qLink;
  2839.     long                             reserved1;
  2840.     long                             reserved2;
  2841.     DirIOCompletionUPP                 ioCompletion;
  2842.     OSErr                             ioResult;
  2843.     unsigned long                     saveA5;
  2844.     short                             reqCode;
  2845.     long                             reserved[2];
  2846.     AddrBlock                         serverHint;
  2847.     short                             dsRefNum;
  2848.     unsigned long                     callID;
  2849.     AuthIdentity                     identity;
  2850.     long                             gReserved1;
  2851.     long                             gReserved2;
  2852.     long                             gReserved3;
  2853.     long                             clientData;
  2854.     DirectoryNamePtr                 directoryName;                /*  --> catalog name */
  2855.     DirDiscriminator                 discriminator;                /*  --> discriminate between dup catalog names */
  2856.     Boolean                         addToOCESetup;                /*  --> add this catalog to OCE Setup */
  2857.     Byte                             padByte;
  2858.     CreationID                         directoryRecordCID;            /* <--  creationID for the catalog record */
  2859. };
  2860. typedef struct DirAddADAPDirectoryPB    DirAddADAPDirectoryPB;
  2861.  
  2862.  
  2863. /*
  2864. GetDirectoryInfo:
  2865. DirGetDirectoryInfo will do:
  2866.  
  2867. If a 'dsRefNum' is non-Zero, the catalog information for
  2868.     the corresponding  PAB will be  returned.
  2869.  If 'dsRefNum' is zero and 'serverHint' is non-zero, If the
  2870.  'serverHint' points to a valid ADAP Catalog Server(Path Finder),
  2871.  the catalog information (i.e. directoryName, discriminator, features)
  2872.  for that catalog will be returned.
  2873.     If a  valid catalog name and discriminator are provided
  2874.     features (Set of capability flags) for that catalog will be returned.
  2875. */
  2876.  
  2877. struct DirGetDirectoryInfoPB {
  2878.     void *                            qLink;
  2879.     long                             reserved1;
  2880.     long                             reserved2;
  2881.     DirIOCompletionUPP                 ioCompletion;
  2882.     OSErr                             ioResult;
  2883.     unsigned long                     saveA5;
  2884.     short                             reqCode;
  2885.     long                             reserved[2];
  2886.     AddrBlock                         serverHint;
  2887.     short                             dsRefNum;
  2888.     unsigned long                     callID;
  2889.     AuthIdentity                     identity;
  2890.     long                             gReserved1;
  2891.     long                             gReserved2;
  2892.     long                             gReserved3;
  2893.     long                             clientData;
  2894.     DirectoryNamePtr                 directoryName;                /*  --> catalog name */
  2895.     DirDiscriminator                 discriminator;                /* <--> descriminate between dup catalog names */
  2896.     DirGestalt                         features;                    /* <--  capability bit flags */
  2897. };
  2898. typedef struct DirGetDirectoryInfoPB    DirGetDirectoryInfoPB;
  2899.  
  2900. /*
  2901.  * Note on Access Controls:
  2902.  * Access control is based on a list model.
  2903.  * You can get access controls list which gives dsObject and accMask for each dsObject.
  2904.  * GetAccessControl can be limited to currently supplied identity by setting forCurrentUserOnly.
  2905.  * There are special DSObjects are defined in ADASTypes.h for each of the category
  2906.  * supported in ADAS Catalogs. (kOwner, kFriends, kAuthenticatedToCluster, 
  2907.  * kAuthenticatedToDirectory, kGuest) and DUGetActlDSSpec call can be used
  2908.  * to obtain appropraiate DSSpec before making set calls to ADAS catalogs.
  2909.  *
  2910.  */
  2911.  
  2912.  
  2913.  
  2914.  
  2915.  
  2916. /*
  2917.     GetDNodeAccessControlGet:
  2918.     This call can be done to get back access control list for a DNode.
  2919.     pRLI -> RLI of the DNode whose access control list is sought
  2920.     curUserAccMask -> If this is 'true', Access controls for the user specified by
  2921.                       the identity parameter will be returned other wise entire list
  2922.                       will be returned.
  2923.     startingDsObj  -> If this is not nil, list should be started after this object.
  2924.     startingPointInclusive -> If staringDsObj is specified, include that in the returned
  2925.                               results.
  2926.                               
  2927.     The results will be collected in the 'getBuffer' supplied by the user.
  2928.     If buffer can not hold all the data returned 'daMoreData' error will be returned.
  2929.      
  2930.     If user receives 'noErr' or 'daMoreData', buffer will contain valid results. A user
  2931.     can extract the results in the 'getBuffer' by making 'DsGetDNodeAccessControlParse' call.
  2932.     
  2933.     Results returned for each DSObject will contain DSSpecPtr and three sets of access mask. 
  2934.  
  2935. */
  2936.  
  2937.  
  2938. struct DirGetDNodeAccessControlGetPB {
  2939.     void *                            qLink;
  2940.     long                             reserved1;
  2941.     long                             reserved2;
  2942.     DirIOCompletionUPP                 ioCompletion;
  2943.     OSErr                             ioResult;
  2944.     unsigned long                     saveA5;
  2945.     short                             reqCode;
  2946.     long                             reserved[2];
  2947.     AddrBlock                         serverHint;
  2948.     short                             dsRefNum;
  2949.     unsigned long                     callID;
  2950.     AuthIdentity                     identity;
  2951.     long                             gReserved1;
  2952.     long                             gReserved2;
  2953.     long                             gReserved3;
  2954.     long                             clientData;
  2955.     PackedRLIPtr                     pRLI;                        /*  -> RLI of the cluster whose access control list is sought  */
  2956.     long                             bReserved;                    /*  -- unused */
  2957.     long                             cReserved;                    /*  -- unused */
  2958.     long                             dReserved;                    /*  -- unused */
  2959.     long                             eResreved;                    /* --> */
  2960.     Boolean                         forCurrentUserOnly;            /* -->  */
  2961.     Boolean                         filler1;
  2962.     DSSpec *                        startingPoint;                /* --> starting Point */
  2963.     Boolean                         includeStartingPoint;        /* --> if true return the DsObject specified in starting point */
  2964.     Boolean                         filler2;
  2965.     void *                            getBuffer;                    /*    -> */
  2966.     unsigned long                     getBufferSize;                /*  -> */
  2967.  
  2968.  
  2969. };
  2970. typedef struct DirGetDNodeAccessControlGetPB DirGetDNodeAccessControlGetPB;
  2971. /* The Access Control call-back function is defined as follows: */
  2972. typedef CALLBACK_API( Boolean , ForEachDNodeAccessControlProcPtr )(long clientData, const DSSpec *dsObj, AccessMask activeDnodeAccMask, AccessMask defaultRecordAccMask, AccessMask defaultAttributeAccMask);
  2973. typedef STACK_UPP_TYPE(ForEachDNodeAccessControlProcPtr)         ForEachDNodeAccessControlUPP;
  2974.  
  2975. typedef ForEachDNodeAccessControlUPP     ForEachDNodeAccessControl;
  2976. /*
  2977.     GetDNodeAccessControlParse:
  2978.     After an GetDNodeAccessControlGet call has completed, 
  2979.     call GetDNodeAccessControlParse to parse through the buffer that
  2980.     that was filled in GetDNodeAccessControlGet.
  2981.     
  2982.     'eachObject' will be called each time to return to the client a
  2983.     DsObject and a set of three accMasks (three long words) for that object.
  2984.     Acceesmasks returned apply to the dsObject in the callback :
  2985.     1. Currently Active Access mask for the specified DNode.
  2986.     2. Default Access mask for any Record in the DNode
  2987.     3. Default Access mask for any Attribute in the DNode
  2988.     The clientData parameter that you pass in the parameter block will be passed
  2989.     to 'eachObject'.  You are free to put anything in clientData - it is intended
  2990.     to allow you some way to match the call-back to the original call (for
  2991.     example, you make more then one aysynchronous GetDNodeAccessControlGet calls and you want to
  2992.     associate returned results in some way).
  2993.     
  2994.     The client should return FALSE from 'eachObject' to continue
  2995.     processing of the GetDNodeAccessControlParse request.  Returning TRUE will
  2996.     terminate the GetDNodeAccessControlParse request.
  2997.  
  2998.     For synchronous calls, the call-back routine actually runs as part of the same thread 
  2999.     of execution as the thread that made the GetDNodeAccessControlParse call.  That means that the
  3000.     same low-memory globals, A5, stack, etc. are in effect during the call-back
  3001.     that were in effect when the call was made.  Because of this, the call-back
  3002.     routine has the same restrictions as the caller of GetDNodeAccessControlParse:
  3003.     if GetDNodeAccessControlParse was not called from interrupt level, then the call-
  3004.     back routine can allocate memory. For asynchronous calls, call-back routine is
  3005.     like a ioCompletion except that A5 will be preserved for the application.
  3006.  
  3007.  
  3008. */
  3009.  
  3010.  
  3011. struct DirGetDNodeAccessControlParsePB {
  3012.     void *                            qLink;
  3013.     long                             reserved1;
  3014.     long                             reserved2;
  3015.     DirIOCompletionUPP                 ioCompletion;
  3016.     OSErr                             ioResult;
  3017.     unsigned long                     saveA5;
  3018.     short                             reqCode;
  3019.     long                             reserved[2];
  3020.     AddrBlock                         serverHint;
  3021.     short                             dsRefNum;
  3022.     unsigned long                     callID;
  3023.     AuthIdentity                     identity;
  3024.     long                             gReserved1;
  3025.     long                             gReserved2;
  3026.     long                             gReserved3;
  3027.     long                             clientData;
  3028.     PackedRLIPtr                     pRLI;                        /*  -> RLI of the cluster  */
  3029.     long                             bReserved;                    /*  -- unused */
  3030.     long                             cReserved;                    /*  -- unused */
  3031.     long                             dReserved;                    /*  -- unused */
  3032.     ForEachDNodeAccessControl         eachObject;                    /* --> */
  3033.     Boolean                         forCurrentUserOnly;            /* -->  */
  3034.     Boolean                         filler1;
  3035.     DSSpec *                        startingPoint;                /* --> starting Point */
  3036.     Boolean                         includeStartingPoint;        /* --> if true return the record specified in starting point */
  3037.     Boolean                         filler2;
  3038.     void *                            getBuffer;                    /*    -> */
  3039.     unsigned long                     getBufferSize;                /*  -> */
  3040.  
  3041.  
  3042. };
  3043. typedef struct DirGetDNodeAccessControlParsePB DirGetDNodeAccessControlParsePB;
  3044. /*
  3045.     GetRecordAccessControlGet:
  3046.     This call can be done to get back access control list for a RecordID.
  3047.     aRecord -> RecordID to which access control list is sought
  3048.     curUserAccMask -> If this is 'true', Access controls for the user specified by
  3049.                       the identity parameter will be returned other wise entire list
  3050.                       will be returned.
  3051.     startingDsObj  -> If this is not nil, list should be started after this object.
  3052.     startingPointInclusive -> If staringDsObj is specified, include that in the returned
  3053.                               results.
  3054.                               
  3055.     The results will be collected in the 'getBuffer' supplied by the user.
  3056.     If buffer can not hold all the data returned 'daMoreData' error will be returned.
  3057.      
  3058.     If user receives 'noErr' or 'daMoreData', buffer will contain valid results. A user
  3059.     can extract the results in the 'getBuffer' by making 'DsGetDNodeAccessControlParse' call.
  3060.     
  3061.     Results returned for each DSObject will contain DSSpecPtr and accMask. 
  3062.  
  3063. */
  3064.  
  3065.  
  3066. struct DirGetRecordAccessControlGetPB {
  3067.     void *                            qLink;
  3068.     long                             reserved1;
  3069.     long                             reserved2;
  3070.     DirIOCompletionUPP                 ioCompletion;
  3071.     OSErr                             ioResult;
  3072.     unsigned long                     saveA5;
  3073.     short                             reqCode;
  3074.     long                             reserved[2];
  3075.     AddrBlock                         serverHint;
  3076.     short                             dsRefNum;
  3077.     unsigned long                     callID;
  3078.     AuthIdentity                     identity;
  3079.     long                             gReserved1;
  3080.     long                             gReserved2;
  3081.     long                             gReserved3;
  3082.     long                             clientData;
  3083.     RecordIDPtr                     aRecord;                    /*  -> RecordID to which access control list is sought list is sought  */
  3084.     long                             bReserved;                    /*  -- unused */
  3085.     long                             cReserved;                    /*  -- unused */
  3086.     long                             dReserved;                    /*  -- unused */
  3087.     long                             eResreved;                    /* --> */
  3088.     Boolean                         forCurrentUserOnly;            /* -->  */
  3089.     Boolean                         filler1;
  3090.     DSSpec *                        startingPoint;                /* --> starting Point */
  3091.     Boolean                         includeStartingPoint;        /* --> if true return the record specified in starting point */
  3092.     Boolean                         filler2;
  3093.     void *                            getBuffer;                    /*    -> */
  3094.     unsigned long                     getBufferSize;                /*  -> */
  3095.  
  3096.  
  3097. };
  3098. typedef struct DirGetRecordAccessControlGetPB DirGetRecordAccessControlGetPB;
  3099. /* The Access Control call-back function is defined as follows: */
  3100. typedef CALLBACK_API( Boolean , ForEachRecordAccessControlProcPtr )(long clientData, const DSSpec *dsObj, AccessMask activeDnodeAccMask, AccessMask activeRecordAccMask, AccessMask defaultAttributeAccMask);
  3101. typedef STACK_UPP_TYPE(ForEachRecordAccessControlProcPtr)         ForEachRecordAccessControlUPP;
  3102.  
  3103. typedef ForEachRecordAccessControlUPP     ForEachRecordAccessControl;
  3104. /*
  3105.     GetRecordAccessControlParse:
  3106.     After an GetRecordAccessControlGet call has completed, 
  3107.     call GetRecordAccessControlParse to parse through the buffer that
  3108.     that was filled in GetRecordAccessControlGet.
  3109.     
  3110.     'eachObject' will be called each time to return to the client a
  3111.     DsObject and a set of three accMasks (three long words) for that object.
  3112.     Acceesmasks returned apply to the dsObject in the callback :
  3113.     1. Active Access mask for the DNode Containing the Record.
  3114.     2. Active Access mask for the Record specified.
  3115.     3. Defualt Access mask for Attributes in the record.
  3116.     The clientData parameter that you pass in the parameter block will be passed
  3117.     to 'eachObject'.  You are free to put anything in clientData - it is intended
  3118.     to allow you some way to match the call-back to the original call (for
  3119.     example, you make more then one aysynchronous GetRecordAccessControlGet calls and you want to
  3120.     associate returned results in some way).
  3121.     
  3122.     The client should return FALSE from 'eachObject' to continue
  3123.     processing of the GetRecordAccessControlParse request.  Returning TRUE will
  3124.     terminate the GetRecordAccessControlParse request.
  3125.  
  3126.     For synchronous calls, the call-back routine actually runs as part of the same thread 
  3127.     of execution as the thread that made the GetRecordAccessControlParse call.  That means that the
  3128.     same low-memory globals, A5, stack, etc. are in effect during the call-back
  3129.     that were in effect when the call was made.  Because of this, the call-back
  3130.     routine has the same restrictions as the caller of GetRecordAccessControlParse:
  3131.     if GetRecordAccessControlParse was not called from interrupt level, then the call-
  3132.     back routine can allocate memory. For asynchronous calls, call-back routine is
  3133.     like a ioCompletion except that A5 will be preserved for the application.
  3134.  
  3135.  
  3136. */
  3137.  
  3138.  
  3139. struct DirGetRecordAccessControlParsePB {
  3140.     void *                            qLink;
  3141.     long                             reserved1;
  3142.     long                             reserved2;
  3143.     DirIOCompletionUPP                 ioCompletion;
  3144.     OSErr                             ioResult;
  3145.     unsigned long                     saveA5;
  3146.     short                             reqCode;
  3147.     long                             reserved[2];
  3148.     AddrBlock                         serverHint;
  3149.     short                             dsRefNum;
  3150.     unsigned long                     callID;
  3151.     AuthIdentity                     identity;
  3152.     long                             gReserved1;
  3153.     long                             gReserved2;
  3154.     long                             gReserved3;
  3155.     long                             clientData;
  3156.     RecordIDPtr                     aRecord;                    /*  -> RecordID to which access control list is sought list is sought  */
  3157.     long                             bReserved;                    /*  -- unused */
  3158.     long                             cReserved;                    /*  -- unused */
  3159.     long                             dReserved;                    /*  -- unused */
  3160.     ForEachRecordAccessControl         eachObject;                    /* --> */
  3161.     Boolean                         forCurrentUserOnly;            /* -->  */
  3162.     Boolean                         filler1;
  3163.     DSSpec *                        startingPoint;                /* --> starting Point */
  3164.     Boolean                         includeStartingPoint;        /* --> if true return the record specified in starting point */
  3165.     Boolean                         filler2;
  3166.     void *                            getBuffer;                    /*    -> */
  3167.     unsigned long                     getBufferSize;                /*  -> */
  3168.  
  3169.  
  3170. };
  3171. typedef struct DirGetRecordAccessControlParsePB DirGetRecordAccessControlParsePB;
  3172. /*
  3173.     GetAttributeAccessControlGet:
  3174.     This call can be done to get back access control list for a attributeType with in a RecordID.
  3175.     aRecord -> RecordID to which access control list is sought
  3176.     aType    -> Attribute Type to which access controls are sought
  3177.     curUserAccMask -> If this is 'true', Access controls for the user specified by
  3178.                       the identity parameter will be returned other wise entire list
  3179.                       will be returned.
  3180.     startingDsObj  -> If this is not nil, list should be started after this object.
  3181.     startingPointInclusive -> If staringDsObj is specified, include that in the returned
  3182.                               results.
  3183.                               
  3184.     The results will be collected in the 'getBuffer' supplied by the user.
  3185.     If buffer can not hold all the data returned 'daMoreData' error will be returned.
  3186.      
  3187.     If user receives 'noErr' or 'daMoreData', buffer will contain valid results. A user
  3188.     can extract the results in the 'getBuffer' by making 'DsGetDNodeAccessControlParse' call.
  3189.     
  3190.     Results returned for each DSObject will contain DSSpecPtr and accMask. 
  3191.  
  3192. */
  3193.  
  3194.  
  3195. struct DirGetAttributeAccessControlGetPB {
  3196.     void *                            qLink;
  3197.     long                             reserved1;
  3198.     long                             reserved2;
  3199.     DirIOCompletionUPP                 ioCompletion;
  3200.     OSErr                             ioResult;
  3201.     unsigned long                     saveA5;
  3202.     short                             reqCode;
  3203.     long                             reserved[2];
  3204.     AddrBlock                         serverHint;
  3205.     short                             dsRefNum;
  3206.     unsigned long                     callID;
  3207.     AuthIdentity                     identity;
  3208.     long                             gReserved1;
  3209.     long                             gReserved2;
  3210.     long                             gReserved3;
  3211.     long                             clientData;
  3212.     RecordIDPtr                     aRecord;                    /*  -> RecordID to which access control list is sought list is sought  */
  3213.     AttributeTypePtr                 aType;                        /*  -> Attribute Type to which access controls are sought          */
  3214.     long                             cReserved;                    /*  -- unused */
  3215.     long                             dReserved;                    /*  -- unused */
  3216.     long                             eResreved;                    /* --> */
  3217.     Boolean                         forCurrentUserOnly;            /* -->  */
  3218.     Boolean                         filler1;
  3219.     DSSpec *                        startingPoint;                /* --> starting Point */
  3220.     Boolean                         includeStartingPoint;        /* --> if true return the record specified in starting point */
  3221.     Boolean                         filler2;
  3222.     void *                            getBuffer;                    /*    -> */
  3223.     unsigned long                     getBufferSize;                /*  -> */
  3224.  
  3225.  
  3226. };
  3227. typedef struct DirGetAttributeAccessControlGetPB DirGetAttributeAccessControlGetPB;
  3228. /* The Access Control call-back function is defined as follows: */
  3229. typedef CALLBACK_API( Boolean , ForEachAttributeAccessControlProcPtr )(long clientData, const DSSpec *dsObj, AccessMask activeDnodeAccMask, AccessMask activeRecordAccMask, AccessMask activeAttributeAccMask);
  3230. typedef STACK_UPP_TYPE(ForEachAttributeAccessControlProcPtr)     ForEachAttributeAccessControlUPP;
  3231.  
  3232. typedef ForEachAttributeAccessControlUPP  ForEachAttributeAccessControl;
  3233. /*
  3234.     GetAttributeAccessControlParse:
  3235.     After an GetAttributeAccessControlGet call has completed, 
  3236.     call GetAttributeAccessControlParse to parse through the buffer that
  3237.     that was filled in GetAttributeAccessControlGet.
  3238.     
  3239.     'eachObject' will be called each time to return to the client a
  3240.     DsObject and a set of three accMasks (three long words) for that object.
  3241.     Acceesmasks returned apply to the dsObject in the callback :
  3242.     1. Active Access mask for the DNode Containing the Attribute.
  3243.     2. Active Access mask for the Record in the Containing the Attribute.
  3244.     3. Active Access mask for the specified Attribute.
  3245.     The clientData parameter that you pass in the parameter block will be passed
  3246.     to 'eachObject'.  You are free to put anything in clientData - it is intended
  3247.     to allow you some way to match the call-back to the original call (for
  3248.     example, you make more then one aysynchronous GetAttributeAccessControlGet calls and you want to
  3249.     associate returned results in some way).
  3250.     
  3251.     The client should return FALSE from 'eachObject' to continue
  3252.     processing of the GetAttributeAccessControlParse request.  Returning TRUE will
  3253.     terminate the GetAttributeAccessControlParse request.
  3254.  
  3255.     For synchronous calls, the call-back routine actually runs as part of the same thread 
  3256.     of execution as the thread that made the GetAttributeAccessControlParse call.  That means that the
  3257.     same low-memory globals, A5, stack, etc. are in effect during the call-back
  3258.     that were in effect when the call was made.  Because of this, the call-back
  3259.     routine has the same restrictions as the caller of GetAttributeAccessControlParse:
  3260.     if GetAttributeAccessControlParse was not called from interrupt level, then the call-
  3261.     back routine can allocate memory. For asynchronous calls, call-back routine is
  3262.     like a ioCompletion except that A5 will be preserved for the application.
  3263.  
  3264.  
  3265. */
  3266.  
  3267.  
  3268. struct DirGetAttributeAccessControlParsePB {
  3269.     void *                            qLink;
  3270.     long                             reserved1;
  3271.     long                             reserved2;
  3272.     DirIOCompletionUPP                 ioCompletion;
  3273.     OSErr                             ioResult;
  3274.     unsigned long                     saveA5;
  3275.     short                             reqCode;
  3276.     long                             reserved[2];
  3277.     AddrBlock                         serverHint;
  3278.     short                             dsRefNum;
  3279.     unsigned long                     callID;
  3280.     AuthIdentity                     identity;
  3281.     long                             gReserved1;
  3282.     long                             gReserved2;
  3283.     long                             gReserved3;
  3284.     long                             clientData;
  3285.     RecordIDPtr                     aRecord;                    /*  -> RecordID to which access control list is sought list is sought  */
  3286.     AttributeTypePtr                 aType;                        /*  -> Attribute Type to which access controls are sought          */
  3287.     long                             cReserved;                    /*  -- unused */
  3288.     long                             dReserved;                    /*  -- unused */
  3289.     ForEachAttributeAccessControl     eachObject;                    /* --> */
  3290.     Boolean                         forCurrentUserOnly;            /* -->  */
  3291.     Boolean                         filler1;
  3292.     DSSpec *                        startingPoint;                /* --> starting Point */
  3293.     Boolean                         includeStartingPoint;        /* --> if true return the record specified in starting point */
  3294.     Boolean                         filler2;
  3295.     void *                            getBuffer;                    /*    -> */
  3296.     unsigned long                     getBufferSize;                /*  -> */
  3297.  
  3298.  
  3299. };
  3300. typedef struct DirGetAttributeAccessControlParsePB DirGetAttributeAccessControlParsePB;
  3301.  
  3302.  
  3303.  
  3304.  
  3305.  
  3306. /*
  3307. MapPathNameToDNodeNumber:
  3308. This call maps a given PathName within a catalog to its DNodeNumber.
  3309. */
  3310.  
  3311. struct DirMapPathNameToDNodeNumberPB {
  3312.     void *                            qLink;
  3313.     long                             reserved1;
  3314.     long                             reserved2;
  3315.     DirIOCompletionUPP                 ioCompletion;
  3316.     OSErr                             ioResult;
  3317.     unsigned long                     saveA5;
  3318.     short                             reqCode;
  3319.     long                             reserved[2];
  3320.     AddrBlock                         serverHint;
  3321.     short                             dsRefNum;
  3322.     unsigned long                     callID;
  3323.     AuthIdentity                     identity;
  3324.     long                             gReserved1;
  3325.     long                             gReserved2;
  3326.     long                             gReserved3;
  3327.     long                             clientData;
  3328.     DirectoryNamePtr                 directoryName;                /*  --> catalog name */
  3329.     DirDiscriminator                 discriminator;                /*  --> discriminator */
  3330.     DNodeNum                         dNodeNumber;                /* <--  dNodenumber to the path */
  3331.     PackedPathNamePtr                 path;                        /*  --> Path Name to be mapped */
  3332. };
  3333. typedef struct DirMapPathNameToDNodeNumberPB DirMapPathNameToDNodeNumberPB;
  3334. /*
  3335. PathName in the path field will be mapped to the cooresponding dNodeNumber and
  3336. returned in the DNodeNumber field. directoryName and descriminator Fields are
  3337. ignored. DSRefNum is used to identify the catalog.
  3338. */
  3339.  
  3340.  
  3341. /*
  3342. MapDNodeNumberToPathName:
  3343. This call will map a given DNodeNumber with in a catalog to the
  3344. corresponding PathName.
  3345. */
  3346.  
  3347. struct DirMapDNodeNumberToPathNamePB {
  3348.     void *                            qLink;
  3349.     long                             reserved1;
  3350.     long                             reserved2;
  3351.     DirIOCompletionUPP                 ioCompletion;
  3352.     OSErr                             ioResult;
  3353.     unsigned long                     saveA5;
  3354.     short                             reqCode;
  3355.     long                             reserved[2];
  3356.     AddrBlock                         serverHint;
  3357.     short                             dsRefNum;
  3358.     unsigned long                     callID;
  3359.     AuthIdentity                     identity;
  3360.     long                             gReserved1;
  3361.     long                             gReserved2;
  3362.     long                             gReserved3;
  3363.     long                             clientData;
  3364.     DirectoryNamePtr                 directoryName;                /*  --> catalog name */
  3365.     DirDiscriminator                 discriminator;                /*  --> discriminator */
  3366.     DNodeNum                         dNodeNumber;                /*  --> dNodenumber to be mapped */
  3367.     PackedPathNamePtr                 path;                        /* <--  Packed Path Name returned */
  3368.     unsigned short                     lengthOfPathName;            /*  --> length of packed pathName structure*/
  3369. };
  3370. typedef struct DirMapDNodeNumberToPathNamePB DirMapDNodeNumberToPathNamePB;
  3371. /*
  3372. dNodeNumber in the DNodeNumber field will be mapped to the cooresponding
  3373. pathName and returned in the PackedPathName field.
  3374. lengthOfPathName is to be set the length of pathName structure.
  3375. If length of PackedPathName is larger then the lengthOfPathName, kOCEMoreData
  3376. OSErr will be returned.
  3377. */
  3378. /*
  3379. GetLocalNetworkSpec:
  3380. This call will return the Local NetworkSpec. Client should supply
  3381. an RString big enough to hold the NetworkSpec.
  3382. */
  3383.  
  3384. struct DirGetLocalNetworkSpecPB {
  3385.     void *                            qLink;
  3386.     long                             reserved1;
  3387.     long                             reserved2;
  3388.     DirIOCompletionUPP                 ioCompletion;
  3389.     OSErr                             ioResult;
  3390.     unsigned long                     saveA5;
  3391.     short                             reqCode;
  3392.     long                             reserved[2];
  3393.     AddrBlock                         serverHint;
  3394.     short                             dsRefNum;
  3395.     unsigned long                     callID;
  3396.     AuthIdentity                     identity;
  3397.     long                             gReserved1;
  3398.     long                             gReserved2;
  3399.     long                             gReserved3;
  3400.     long                             clientData;
  3401.     DirectoryNamePtr                 directoryName;                /*  --> catalog name */
  3402.     DirDiscriminator                 discriminator;                /*  --> discriminator */
  3403.     NetworkSpecPtr                     networkSpec;                /* <--  NetworkSpec */
  3404. };
  3405. typedef struct DirGetLocalNetworkSpecPB    DirGetLocalNetworkSpecPB;
  3406. /*
  3407. PathName in the path field must be set to nil. internetName should be large
  3408. enough to hold the internetName. InterNetname returned indicates path finder's
  3409. local internet (configured by administrator).
  3410. */
  3411. /*
  3412. GetDNodeInfo:
  3413. This call will return the information (internetName and descriptor)
  3414. for the given RLI of a DNode.
  3415. */
  3416.  
  3417. struct DirGetDNodeInfoPB {
  3418.     void *                            qLink;
  3419.     long                             reserved1;
  3420.     long                             reserved2;
  3421.     DirIOCompletionUPP                 ioCompletion;
  3422.     OSErr                             ioResult;
  3423.     unsigned long                     saveA5;
  3424.     short                             reqCode;
  3425.     long                             reserved[2];
  3426.     AddrBlock                         serverHint;
  3427.     short                             dsRefNum;
  3428.     unsigned long                     callID;
  3429.     AuthIdentity                     identity;
  3430.     long                             gReserved1;
  3431.     long                             gReserved2;
  3432.     long                             gReserved3;
  3433.     long                             clientData;
  3434.     PackedRLIPtr                     pRLI;                        /*  --> packed RLI whose info is requested */
  3435.     DirNodeKind                     descriptor;                    /* <--  dNode descriptor */
  3436.     NetworkSpecPtr                     networkSpec;                /* <--  cluster's networkSpec if kIsCluster */
  3437. };
  3438. typedef struct DirGetDNodeInfoPB        DirGetDNodeInfoPB;
  3439. /*
  3440. If DnodeNumber is set to a non zero value, path should be set to nil.
  3441. if DnodeNumber is set to zero, pathName should point to a packed path name.
  3442. internetName should be large enough to hold
  3443. the internetName. (If the internetName is same as the one got by
  3444. GetLocalInternetName call, it indicates cluster is reachable  without
  3445. forwarders, --> Tell me if I am wrong)
  3446. */
  3447.  
  3448. /*
  3449. DirCreatePersonalDirectory:
  3450. A new  personal catalog can be created by specifying an FSSpec for
  3451. the file. If a file already exists dupFNErr will be returned. This call is
  3452. supported 'synchronous' mode only.
  3453. */
  3454.  
  3455. struct DirCreatePersonalDirectoryPB {
  3456.     void *                            qLink;
  3457.     long                             reserved1;
  3458.     long                             reserved2;
  3459.     DirIOCompletionUPP                 ioCompletion;
  3460.     OSErr                             ioResult;
  3461.     unsigned long                     saveA5;
  3462.     short                             reqCode;
  3463.     long                             reserved[2];
  3464.     AddrBlock                         serverHint;
  3465.     short                             dsRefNum;
  3466.     unsigned long                     callID;
  3467.     AuthIdentity                     identity;
  3468.     long                             gReserved1;
  3469.     long                             gReserved2;
  3470.     long                             gReserved3;
  3471.     long                             clientData;
  3472.     FSSpecPtr                         fsSpec;                        /*  --> FSSpec for the Personal Catalog */
  3473.     OSType                             fdType;                        /*  --> file type for the Personal Catalog */
  3474.     OSType                             fdCreator;                    /*  --> file creator for the Personal Catalog */
  3475. };
  3476. typedef struct DirCreatePersonalDirectoryPB DirCreatePersonalDirectoryPB;
  3477. /*
  3478. DirOpenPersonalDirectory:
  3479. An existing personal catalog can be opened using this call.
  3480. User can specify the personal catalog by FSSpec for the AddressBook file.
  3481. 'accessRequested' field specifies open permissions. 'fsRdPerm'  & 'fsRdWrPerm'
  3482. are the only accepted open modes for the address book.
  3483. When the call completes successfully, a dsRefNum will be returned. The 'dsRefNum'
  3484. field is in the DSParamBlockHeader. In addittion 'accessGranted' indicates
  3485. actual permission with personal catalog is opened and 'features' indicate the capabilty flags
  3486. associated with the personal catalog.
  3487. This call is supported 'synchronous' mode only.
  3488. */
  3489.  
  3490.  
  3491. struct DirOpenPersonalDirectoryPB {
  3492.     void *                            qLink;
  3493.     long                             reserved1;
  3494.     long                             reserved2;
  3495.     DirIOCompletionUPP                 ioCompletion;
  3496.     OSErr                             ioResult;
  3497.     unsigned long                     saveA5;
  3498.     short                             reqCode;
  3499.     long                             reserved[2];
  3500.     AddrBlock                         serverHint;
  3501.     short                             dsRefNum;
  3502.     unsigned long                     callID;
  3503.     AuthIdentity                     identity;
  3504.     long                             gReserved1;
  3505.     long                             gReserved2;
  3506.     long                             gReserved3;
  3507.     long                             clientData;
  3508.     FSSpecPtr                         fsSpec;                        /*  --> Open an existing Personal Catalog */
  3509.     SInt8                             accessRequested;            /*  --> Open: permissions Requested(byte)*/
  3510.     SInt8                             accessGranted;                /*  <-- Open: permissions (byte) (Granted)*/
  3511.     DirGestalt                         features;                    /* <--  features for Personal Catalog */
  3512. };
  3513. typedef struct DirOpenPersonalDirectoryPB DirOpenPersonalDirectoryPB;
  3514. /*
  3515. DirClosePersonalDirectory: This call lets a client close AddressBook opened by DirOpenPersonalDirectory.
  3516. The Personal Catalog specified by the 'dsRefNum' will be closed.
  3517. This call is supported 'synchronous' mode only.
  3518. */
  3519.  
  3520. struct DirClosePersonalDirectoryPB {
  3521.     void *                            qLink;
  3522.     long                             reserved1;
  3523.     long                             reserved2;
  3524.     DirIOCompletionUPP                 ioCompletion;
  3525.     OSErr                             ioResult;
  3526.     unsigned long                     saveA5;
  3527.     short                             reqCode;
  3528.     long                             reserved[2];
  3529.     AddrBlock                         serverHint;
  3530.     short                             dsRefNum;
  3531.     unsigned long                     callID;
  3532.     AuthIdentity                     identity;
  3533.     long                             gReserved1;
  3534.     long                             gReserved2;
  3535.     long                             gReserved3;
  3536.     long                             clientData;
  3537. };
  3538. typedef struct DirClosePersonalDirectoryPB DirClosePersonalDirectoryPB;
  3539.  
  3540. /*
  3541. DirMakePersonalDirectoryRLI: With this call a client can make an RLI
  3542. for a Personal Catalog opened by DirOpenPersonalDirectory Call.
  3543. A packed RLI is created for the Personal Catalog specified by the 'dsRefNum'.
  3544. If a client has a need to make the AddressBook reference to persistent
  3545. acrross boots it should make use of this call. In the current implementaion
  3546. PackedRLI has an embeeded System7.0 'alias'. If in later time
  3547. If client has a need to make reference to the AddressBook, it must use
  3548. ADAPLibrary call 'DUExtractAlias' and resole the 'alias' to 'FSSpec' and
  3549. make DirOpenPersonalDirectory call to get a 'dsRefNum'.
  3550.   'fromFSSpec'            FSPecPtr from which relative alias to be created. If nil,
  3551.                         absolute alias is created.
  3552.  'pRLIBufferSize' indicates the size of buffer pointed by 'pRLI'
  3553.  'pRLISize'    indicates the actual length of 'pRLI'. If the call
  3554.                         fails with 'kOCEMoreData' error a client can reissue
  3555.                     this call with a larger buffer of this length.
  3556.   'pRLI' is pointer to the buffer in which 'PackedRLI' is
  3557.   returned.
  3558. This call is supported in 'synchronous' mode only.
  3559. */
  3560.  
  3561. struct DirMakePersonalDirectoryRLIPB {
  3562.     void *                            qLink;
  3563.     long                             reserved1;
  3564.     long                             reserved2;
  3565.     DirIOCompletionUPP                 ioCompletion;
  3566.     OSErr                             ioResult;
  3567.     unsigned long                     saveA5;
  3568.     short                             reqCode;
  3569.     long                             reserved[2];
  3570.     AddrBlock                         serverHint;
  3571.     short                             dsRefNum;
  3572.     unsigned long                     callID;
  3573.     AuthIdentity                     identity;
  3574.     long                             gReserved1;
  3575.     long                             gReserved2;
  3576.     long                             gReserved3;
  3577.     long                             clientData;
  3578.     FSSpecPtr                         fromFSSpec;                    /*  --> FSSpec for creating relative alia */
  3579.     unsigned short                     pRLIBufferSize;                /*  --> Length of 'pRLI' buffer */
  3580.     unsigned short                     pRLISize;                    /* <--  Length of actual 'pRLI' */
  3581.     PackedRLIPtr                     pRLI;                        /* <--  pRLI for the specified AddressBook */
  3582. };
  3583. typedef struct DirMakePersonalDirectoryRLIPB DirMakePersonalDirectoryRLIPB;
  3584.  
  3585. /*****************************************************************************
  3586. The calls described below apply only for CSAM Drivers:
  3587.  
  3588. The following three calls provide capability to Install/Remove a CSAM at RunTime.
  3589.     DirAddDSAM
  3590.     DirRemoveDSAM
  3591.     DirInstantiateDSAM
  3592.  
  3593. The following two calls provide capability to Install/Remove a CSAM Catalog at RunTime.
  3594.     DirAddDSAMDirectory
  3595.     DirRemoveDirectory
  3596.  
  3597. DirGetDirectoryIcon call is used by clients to get any special icon associated
  3598. with a CSAM catalog.
  3599.  
  3600. *****************************************************************************/
  3601.  
  3602. /*
  3603. DirAddDSAM: This call can be used to inorm the availability of a CSAM file
  3604. after discovering the CSAM file.
  3605.     dsamName -> is generic CSAM name e.g. Untitled X.500 directory
  3606.     dsamSignature -> could be generic CSAM kind e.g. 'X500'.
  3607.     fsSpec -> is the FileSpec for the file containing CSAM resources.
  3608. If the call is successfull 'DSAMRecordCID' will be returned. If the
  3609. call returns 'daDSAMRecordCIDExists', record was already there and
  3610. 'dsamRecordCID' will be returned.
  3611. This call can be done only in synchronous mode.
  3612. */
  3613.  
  3614. struct DirAddDSAMPB {
  3615.     void *                            qLink;
  3616.     long                             reserved1;
  3617.     long                             reserved2;
  3618.     DirIOCompletionUPP                 ioCompletion;
  3619.     OSErr                             ioResult;
  3620.     unsigned long                     saveA5;
  3621.     short                             reqCode;
  3622.     long                             reserved[2];
  3623.     AddrBlock                         serverHint;
  3624.     short                             dsRefNum;
  3625.     unsigned long                     callID;
  3626.     AuthIdentity                     identity;
  3627.     long                             gReserved1;
  3628.     long                             gReserved2;
  3629.     long                             gReserved3;
  3630.     long                             clientData;
  3631.     CreationID                         dsamRecordCID;                /* <--  CreationID for the CSAM record */
  3632.     RStringPtr                         dsamName;                    /*  --> CSAM name */
  3633.     OCEDirectoryKind                 dsamKind;                    /*  --> CSAM kind */
  3634.     FSSpecPtr                         fsSpec;                        /*  --> FSSpec for the file containing CSAM */
  3635. };
  3636. typedef struct DirAddDSAMPB                DirAddDSAMPB;
  3637. /*
  3638. DirInstantiateDSAM: This call should be used by the CSAM driver in response
  3639. Driver Open call to indicate the toolbox about the availability of the CSAM.
  3640.     dsamName -> is generic CSAM name e.g. Untitled X.500 directory
  3641.     dsamKind -> could be generic CSAM kind e.g. 'X500'.
  3642.     dsamData -> pointer to private DSAMData. This will be paased back to the CSAM
  3643.     when the CSAM functions (DSAMDirProc,DSAMDirParseProc, DSAMAuthProc) are called.
  3644.     CSAM should already be setup using DirAddDSAM call.
  3645.     DSAMDirProc -> This procedure will be called when  any catalog service
  3646.     call intended for the CSAM (other then parse calls)
  3647.     DSAMDirParseProc -> This procedure will be called when any of the parse calls
  3648.     are called.
  3649.     DSAMAuthProc -> This procedure will be called when any of the Authentication Calls
  3650.     are made to the CSAM. If the CSAM does not support authentication, this can be nil.
  3651. This call can be done only in synchronous mode.
  3652. */
  3653. typedef CALLBACK_API( OSErr , DSAMDirProcPtr )(void *dsamData, DirParamBlockPtr paramBlock, Boolean async);
  3654. typedef STACK_UPP_TYPE(DSAMDirProcPtr)                             DSAMDirUPP;
  3655.  
  3656. typedef DSAMDirUPP                         DSAMDirProc;
  3657. typedef CALLBACK_API( OSErr , DSAMDirParseProcPtr )(void *dsamData, DirParamBlockPtr paramBlock, Boolean async);
  3658. typedef STACK_UPP_TYPE(DSAMDirParseProcPtr)                     DSAMDirParseUPP;
  3659. typedef DSAMDirParseUPP                 DSAMDirParseProc;
  3660. typedef CALLBACK_API( OSErr , DSAMAuthProcPtr )(void *dsamData, AuthParamBlockPtr pb, Boolean async);
  3661. typedef STACK_UPP_TYPE(DSAMAuthProcPtr)                         DSAMAuthUPP;
  3662. typedef DSAMAuthUPP                     DSAMAuthProc;
  3663.  
  3664. struct DirInstantiateDSAMPB {
  3665.     void *                            qLink;
  3666.     long                             reserved1;
  3667.     long                             reserved2;
  3668.     DirIOCompletionUPP                 ioCompletion;
  3669.     OSErr                             ioResult;
  3670.     unsigned long                     saveA5;
  3671.     short                             reqCode;
  3672.     long                             reserved[2];
  3673.     AddrBlock                         serverHint;
  3674.     short                             dsRefNum;
  3675.     unsigned long                     callID;
  3676.     AuthIdentity                     identity;
  3677.     long                             gReserved1;
  3678.     long                             gReserved2;
  3679.     long                             gReserved3;
  3680.     long                             clientData;
  3681.     RStringPtr                         dsamName;                    /*  --> dsamName name */
  3682.     OCEDirectoryKind                 dsamKind;                    /*  --> DSAMKind */
  3683.     void *                            dsamData;                    /*  --> dsamData  */
  3684.     DSAMDirUPP                         dsamDirProc;                /*  --> of type DSAMDirProc: for catalog service calls */
  3685.     DSAMDirParseUPP                 dsamDirParseProc;            /*  --> of type DSAMDirParseProc: for catalog service parse calls */
  3686.     DSAMAuthUPP                     dsamAuthProc;                /*  --> of type DSAMAuthProc: for authetication service calls */
  3687. };
  3688. typedef struct DirInstantiateDSAMPB        DirInstantiateDSAMPB;
  3689.  
  3690. /*
  3691. DirRemoveDSAM: This call can be used to remove  a CSAM file from the OCE Setup.
  3692.     dsamRecordCID -> is the creationID of the CSAM record.
  3693. This call can be made only in synchronous mode.
  3694. */
  3695.  
  3696. struct DirRemoveDSAMPB {
  3697.     void *                            qLink;
  3698.     long                             reserved1;
  3699.     long                             reserved2;
  3700.     DirIOCompletionUPP                 ioCompletion;
  3701.     OSErr                             ioResult;
  3702.     unsigned long                     saveA5;
  3703.     short                             reqCode;
  3704.     long                             reserved[2];
  3705.     AddrBlock                         serverHint;
  3706.     short                             dsRefNum;
  3707.     unsigned long                     callID;
  3708.     AuthIdentity                     identity;
  3709.     long                             gReserved1;
  3710.     long                             gReserved2;
  3711.     long                             gReserved3;
  3712.     long                             clientData;
  3713.     CreationID                         dsamRecordCID;                /* <--  CreationID for the CSAM record */
  3714. };
  3715. typedef struct DirRemoveDSAMPB            DirRemoveDSAMPB;
  3716.  
  3717. /*
  3718. DirAddDSAMDirectory: This call can be used to inorm the availability of a CSAM catalog.
  3719.     dsamRecordCID ->  recordID for the CSAM serving this catalog
  3720.     directoryName ->  name of the catalog
  3721.     discriminator -> discriminator for the catalog
  3722.     directoryRecordCID -> If the call is successful, creationID for the record will
  3723.                             be returned.
  3724. */
  3725.  
  3726. struct DirAddDSAMDirectoryPB {
  3727.     void *                            qLink;
  3728.     long                             reserved1;
  3729.     long                             reserved2;
  3730.     DirIOCompletionUPP                 ioCompletion;
  3731.     OSErr                             ioResult;
  3732.     unsigned long                     saveA5;
  3733.     short                             reqCode;
  3734.     long                             reserved[2];
  3735.     AddrBlock                         serverHint;
  3736.     short                             dsRefNum;
  3737.     unsigned long                     callID;
  3738.     AuthIdentity                     identity;
  3739.     long                             gReserved1;
  3740.     long                             gReserved2;
  3741.     long                             gReserved3;
  3742.     long                             clientData;
  3743.     CreationID                         dsamRecordCID;                /*  --> CreationID for the CSAM record */
  3744.     DirectoryNamePtr                 directoryName;                /*  --> catalog name */
  3745.     DirDiscriminator                 discriminator;                /*  --> catalog discriminator */
  3746.     DirGestalt                         features;                    /*  --> capabilty flags for the catalog */
  3747.     CreationID                         directoryRecordCID;            /* <--  creationID for the catalog record */
  3748. };
  3749. typedef struct DirAddDSAMDirectoryPB    DirAddDSAMDirectoryPB;
  3750. /*
  3751. DirRemoveDirectory: This call can be used to inform the toolbox that
  3752. catalog specified by 'directoryRecordCID'
  3753. */
  3754.  
  3755. struct DirRemoveDirectoryPB {
  3756.     void *                            qLink;
  3757.     long                             reserved1;
  3758.     long                             reserved2;
  3759.     DirIOCompletionUPP                 ioCompletion;
  3760.     OSErr                             ioResult;
  3761.     unsigned long                     saveA5;
  3762.     short                             reqCode;
  3763.     long                             reserved[2];
  3764.     AddrBlock                         serverHint;
  3765.     short                             dsRefNum;
  3766.     unsigned long                     callID;
  3767.     AuthIdentity                     identity;
  3768.     long                             gReserved1;
  3769.     long                             gReserved2;
  3770.     long                             gReserved3;
  3771.     long                             clientData;
  3772.     CreationID                         directoryRecordCID;            /*  --> creationID for the catalog record */
  3773. };
  3774. typedef struct DirRemoveDirectoryPB        DirRemoveDirectoryPB;
  3775. /*
  3776.  * DSGetExtendedDirectoriesInfo::  This call can be used to get
  3777.  * the information of various foreign catalogs supported.
  3778.  * Typically a DE Template  may make this call to create a
  3779.  * Address template or a Gateway may make this call to findout
  3780.  * catalog name space in which MSAM may would support. 
  3781.  * Client will supply a buffer pointed by 'bufferPtr' of size 'bufferLength'. 
  3782.  * When the call completes with 'daMoreData' error, client can examine 'totalEntries'
  3783.  * returned and reissue the call with increaing buffer.
  3784.  * Toolbox will findout the private information of each of the Foreign Catalogs
  3785.  * by polling CSAM's, Gateways, and MnMServers. The Information returned
  3786.  * for each catalog will be packed in the format: 
  3787.  * typedef struct EachDirectoryData {
  3788.  *  PackedRLI                        pRLI;           //  packed RLI for the catalog
  3789.  *  OSType                            entnType;        //  Entn Type
  3790.  *  long                            hasMailSlot;   //  If this catalog has mail slot this will be 1 otherwise zero
  3791.  *    ProtoRString                    RealName;      //  Packed RString for Real Name (padded to even boundary) 
  3792.  *    ProtoRString                    comment;       //  Packed RString holding any comment for Display (padded to even boundary)
  3793.  *    long                            length;        //  data length
  3794.  *    char                            data[length];  //  data padded to even boundary
  3795.  * };
  3796.  *
  3797.  *
  3798.  *
  3799.  * typedef struct myData {
  3800.  *      EachDirectoryData    data[numberOfEntries];    // data packed in the above format
  3801.  *    };
  3802.  *
  3803.  */
  3804.  
  3805. struct DirGetExtendedDirectoriesInfoPB {
  3806.     void *                            qLink;
  3807.     long                             reserved1;
  3808.     long                             reserved2;
  3809.     DirIOCompletionUPP                 ioCompletion;
  3810.     OSErr                             ioResult;
  3811.     unsigned long                     saveA5;
  3812.     short                             reqCode;
  3813.     long                             reserved[2];
  3814.     AddrBlock                         serverHint;
  3815.     short                             dsRefNum;
  3816.     unsigned long                     callID;
  3817.     AuthIdentity                     identity;
  3818.     long                             gReserved1;
  3819.     long                             gReserved2;
  3820.     long                             gReserved3;
  3821.     long                             clientData;
  3822.     void *                            buffer;                        /*  --> Pointer to a buufer where data will be returned */
  3823.     unsigned long                     bufferSize;                    /*  --> Length of the buffer, Length of actual data will be returned here */
  3824.     unsigned long                     totalEntries;                /* <--  Total Number of Catalogs found */
  3825.     unsigned long                     actualEntries;                /* <--  Total Number of Catalogs entries returned */
  3826. };
  3827. typedef struct DirGetExtendedDirectoriesInfoPB DirGetExtendedDirectoriesInfoPB;
  3828. /*
  3829. DirGetDirectoryIconPB: With this call a client can find out about
  3830. the icons supported by the Catalog.
  3831. Both ADAP and Personal Catalog will not support this call for now.
  3832. A CSAM can support a call so that DE Extension can use this
  3833. call to find appropriate Icons.
  3834.  
  3835. Returns kOCEBufferTooSmall if icon is too small, but will update iconSize.
  3836. */
  3837.  
  3838. struct DirGetDirectoryIconPB {
  3839.     void *                            qLink;
  3840.     long                             reserved1;
  3841.     long                             reserved2;
  3842.     DirIOCompletionUPP                 ioCompletion;
  3843.     OSErr                             ioResult;
  3844.     unsigned long                     saveA5;
  3845.     short                             reqCode;
  3846.     long                             reserved[2];
  3847.     AddrBlock                         serverHint;
  3848.     short                             dsRefNum;
  3849.     unsigned long                     callID;
  3850.     AuthIdentity                     identity;
  3851.     long                             gReserved1;
  3852.     long                             gReserved2;
  3853.     long                             gReserved3;
  3854.     long                             clientData;
  3855.     PackedRLIPtr                     pRLI;                        /*  --> packed RLI for the catalog */
  3856.     OSType                             iconType;                    /*  --> Type of Icon requested */
  3857.     void *                            iconBuffer;                    /*  --> Buffer to hold Icon Data */
  3858.     unsigned long                     bufferSize;                    /*  <-> size of buffer to hold icon data */
  3859. };
  3860. typedef struct DirGetDirectoryIconPB    DirGetDirectoryIconPB;
  3861. /*
  3862. DirGetOCESetupRefNum: This call will return 'dsRefnum' for the OCE Setup Personal Catalog
  3863. and oceSetupRecordCID for the oceSetup Record.
  3864. Clients interested in manipulating OCE Setup Personal Catalog directly should
  3865. make this call to get 'dsRefNum'.
  3866. 'dsRefNum' will be returned in the standard field in the DirParamHeader.
  3867. */
  3868.  
  3869. struct DirGetOCESetupRefNumPB {
  3870.     void *                            qLink;
  3871.     long                             reserved1;
  3872.     long                             reserved2;
  3873.     DirIOCompletionUPP                 ioCompletion;
  3874.     OSErr                             ioResult;
  3875.     unsigned long                     saveA5;
  3876.     short                             reqCode;
  3877.     long                             reserved[2];
  3878.     AddrBlock                         serverHint;
  3879.     short                             dsRefNum;
  3880.     unsigned long                     callID;
  3881.     AuthIdentity                     identity;
  3882.     long                             gReserved1;
  3883.     long                             gReserved2;
  3884.     long                             gReserved3;
  3885.     long                             clientData;
  3886.     CreationID                         oceSetupRecordCID;            /* --> creationID for the catalog record */
  3887. };
  3888. typedef struct DirGetOCESetupRefNumPB    DirGetOCESetupRefNumPB;
  3889.  
  3890. /*****************************************************************************/
  3891. /* Catalog and Authentication control blocks and operation definitions */
  3892.  
  3893. union AuthParamBlock {
  3894.     struct {
  3895.         void *                            qLink;
  3896.         long                             reserved1;
  3897.         long                             reserved2;
  3898.         AuthIOCompletionUPP             ioCompletion;
  3899.         OSErr                             ioResult;
  3900.         unsigned long                     saveA5;
  3901.         short                             reqCode;
  3902.         long                             reserved[2];
  3903.         AddrBlock                         serverHint;
  3904.         short                             dsRefNum;
  3905.         unsigned long                     callID;
  3906.         AuthIdentity                     identity;
  3907.         long                             gReserved1;
  3908.         long                             gReserved2;
  3909.         long                             gReserved3;
  3910.         long                             clientData;
  3911.     }                                 header;
  3912.     AuthBindSpecificIdentityPB         bindIdentityPB;
  3913.     AuthUnbindSpecificIdentityPB     unbindIdentityPB;
  3914.     AuthResolveCreationIDPB         resolveCreationIDPB;
  3915.     AuthGetSpecificIdentityInfoPB     getIdentityInfoPB;
  3916.     AuthAddKeyPB                     addKeyPB;
  3917.     AuthChangeKeyPB                 changeKeyPB;
  3918.     AuthDeleteKeyPB                 deleteKeyPB;
  3919.     AuthPasswordToKeyPB             passwordToKeyPB;
  3920.     AuthGetCredentialsPB             getCredentialsPB;
  3921.     AuthDecryptCredentialsPB         decryptCredentialsPB;
  3922.     AuthMakeChallengePB             makeChallengePB;
  3923.     AuthMakeReplyPB                 makeReplyPB;
  3924.     AuthVerifyReplyPB                 verifyReplyPB;
  3925.     AuthGetUTCTimePB                 getUTCTimePB;
  3926.     AuthMakeProxyPB                 makeProxyPB;
  3927.     AuthTradeProxyForCredentialsPB     tradeProxyForCredentialsPB;
  3928.     AuthGetLocalIdentityPB             getLocalIdentityPB;
  3929.     AuthUnlockLocalIdentityPB         unLockLocalIdentityPB;
  3930.     AuthLockLocalIdentityPB         lockLocalIdentityPB;
  3931.     AuthAddToLocalIdentityQueuePB     localIdentityQInstallPB;
  3932.     AuthRemoveFromLocalIdentityQueuePB  localIdentityQRemovePB;
  3933.     AuthSetupLocalIdentityPB         setupLocalIdentityPB;
  3934.     AuthChangeLocalIdentityPB         changeLocalIdentityPB;
  3935.     AuthRemoveLocalIdentityPB         removeLocalIdentityPB;
  3936.     OCESetupAddDirectoryInfoPB         setupDirectoryIdentityPB;
  3937.     OCESetupChangeDirectoryInfoPB     changeDirectoryIdentityPB;
  3938.     OCESetupRemoveDirectoryInfoPB     removeDirectoryIdentityPB;
  3939.     OCESetupGetDirectoryInfoPB         getDirectoryIdentityInfoPB;
  3940. };
  3941.  
  3942.  
  3943. union DirParamBlock {
  3944.     struct {
  3945.         void *                            qLink;
  3946.         long                             reserved1;
  3947.         long                             reserved2;
  3948.         DirIOCompletionUPP                 ioCompletion;
  3949.         OSErr                             ioResult;
  3950.         unsigned long                     saveA5;
  3951.         short                             reqCode;
  3952.         long                             reserved[2];
  3953.         AddrBlock                         serverHint;
  3954.         short                             dsRefNum;
  3955.         unsigned long                     callID;
  3956.         AuthIdentity                     identity;
  3957.         long                             gReserved1;
  3958.         long                             gReserved2;
  3959.         long                             gReserved3;
  3960.         long                             clientData;
  3961.     }                                 header;
  3962.     DirAddRecordPB                     addRecordPB;
  3963.     DirDeleteRecordPB                 deleteRecordPB;
  3964.     DirEnumerateGetPB                 enumerateGetPB;
  3965.     DirEnumerateParsePB             enumerateParsePB;
  3966.     DirFindRecordGetPB                 findRecordGetPB;
  3967.     DirFindRecordParsePB             findRecordParsePB;
  3968.     DirLookupGetPB                     lookupGetPB;
  3969.     DirLookupParsePB                 lookupParsePB;
  3970.     DirAddAttributeValuePB             addAttributeValuePB;
  3971.     DirDeleteAttributeTypePB         deleteAttributeTypePB;
  3972.     DirDeleteAttributeValuePB         deleteAttributeValuePB;
  3973.     DirChangeAttributeValuePB         changeAttributeValuePB;
  3974.     DirVerifyAttributeValuePB         verifyAttributeValuePB;
  3975.     DirFindValuePB                     findValuePB;
  3976.     DirEnumeratePseudonymGetPB         enumeratePseudonymGetPB;
  3977.     DirEnumeratePseudonymParsePB     enumeratePseudonymParsePB;
  3978.     DirAddPseudonymPB                 addPseudonymPB;
  3979.     DirDeletePseudonymPB             deletePseudonymPB;
  3980.     DirAddAliasPB                     addAliasPB;
  3981.     DirEnumerateAttributeTypesGetPB  enumerateAttributeTypesGetPB;
  3982.     DirEnumerateAttributeTypesParsePB  enumerateAttributeTypesParsePB;
  3983.     DirGetNameAndTypePB             getNameAndTypePB;
  3984.     DirSetNameAndTypePB             setNameAndTypePB;
  3985.     DirGetRecordMetaInfoPB             getRecordMetaInfoPB;
  3986.     DirGetDNodeMetaInfoPB             getDNodeMetaInfoPB;
  3987.     DirGetDirectoryInfoPB             getDirectoryInfoPB;
  3988.  
  3989.     DirGetDNodeAccessControlGetPB     getDNodeAccessControlGetPB;
  3990.     DirGetDNodeAccessControlParsePB  getDNodeAccessControlParsePB;
  3991.  
  3992.     DirGetRecordAccessControlGetPB     getRecordAccessControlGetPB;
  3993.     DirGetRecordAccessControlParsePB  getRecordAccessControlParsePB;
  3994.  
  3995.     DirGetAttributeAccessControlGetPB  getAttributeAccessControlGetPB;
  3996.     DirGetAttributeAccessControlParsePB  getAttributeAccessControlParsePB;
  3997.  
  3998.  
  3999.     DirEnumerateDirectoriesGetPB     enumerateDirectoriesGetPB;
  4000.     DirEnumerateDirectoriesParsePB     enumerateDirectoriesParsePB;
  4001.  
  4002.     DirAddADAPDirectoryPB             addADAPDirectoryPB;
  4003.     DirRemoveDirectoryPB             removeDirectoryPB;
  4004.     DirNetSearchADAPDirectoriesGetPB  netSearchADAPDirectoriesGetPB;
  4005.     DirNetSearchADAPDirectoriesParsePB  netSearchADAPDirectoriesParsePB;
  4006.     DirFindADAPDirectoryByNetSearchPB  findADAPDirectoryByNetSearchPB;
  4007.  
  4008.  
  4009.     DirMapDNodeNumberToPathNamePB     mapDNodeNumberToPathNamePB;
  4010.     DirMapPathNameToDNodeNumberPB     mapPathNameToDNodeNumberPB;
  4011.     DirGetLocalNetworkSpecPB         getLocalNetworkSpecPB;
  4012.     DirGetDNodeInfoPB                 getDNodeInfoPB;
  4013.  
  4014.     DirCreatePersonalDirectoryPB     createPersonalDirectoryPB;
  4015.     DirOpenPersonalDirectoryPB         openPersonalDirectoryPB;
  4016.     DirClosePersonalDirectoryPB     closePersonalDirectoryPB;
  4017.     DirMakePersonalDirectoryRLIPB     makePersonalDirectoryRLIPB;
  4018.  
  4019.     DirAddDSAMPB                     addDSAMPB;
  4020.     DirInstantiateDSAMPB             instantiateDSAMPB;
  4021.     DirRemoveDSAMPB                 removeDSAMPB;
  4022.     DirAddDSAMDirectoryPB             addDSAMDirectoryPB;
  4023.     DirGetExtendedDirectoriesInfoPB  getExtendedDirectoriesInfoPB;
  4024.     DirGetDirectoryIconPB             getDirectoryIconPB;
  4025.  
  4026.     DirGetOCESetupRefNumPB             dirGetOCESetupRefNumPB;
  4027.  
  4028.     DirAbortPB                         abortPB;
  4029. };
  4030.  
  4031. enum { uppAuthIOCompletionProcInfo = 0x00009802 };                 /* register no_return_value Func(4_bytes:A0) */
  4032. enum { uppNotificationProcInfo = 0x00003FD0 };                     /* pascal 1_byte Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  4033. enum { uppDirIOCompletionProcInfo = 0x00009802 };                 /* register no_return_value Func(4_bytes:A0) */
  4034. enum { uppForEachDirEnumSpecProcInfo = 0x000003D0 };             /* pascal 1_byte Func(4_bytes, 4_bytes) */
  4035. enum { uppForEachRecordProcInfo = 0x00000FD0 };                 /* pascal 1_byte Func(4_bytes, 4_bytes, 4_bytes) */
  4036. enum { uppForEachLookupRecordIDProcInfo = 0x000003D0 };         /* pascal 1_byte Func(4_bytes, 4_bytes) */
  4037. enum { uppForEachAttrTypeLookupProcInfo = 0x00000FD0 };         /* pascal 1_byte Func(4_bytes, 4_bytes, 4_bytes) */
  4038. enum { uppForEachAttrValueProcInfo = 0x000003D0 };                 /* pascal 1_byte Func(4_bytes, 4_bytes) */
  4039. enum { uppForEachAttrTypeProcInfo = 0x000003D0 };                 /* pascal 1_byte Func(4_bytes, 4_bytes) */
  4040. enum { uppForEachRecordIDProcInfo = 0x000003D0 };                 /* pascal 1_byte Func(4_bytes, 4_bytes) */
  4041. enum { uppForEachDirectoryProcInfo = 0x00003FD0 };                 /* pascal 1_byte Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  4042. enum { uppForEachADAPDirectoryProcInfo = 0x0000FFD0 };             /* pascal 1_byte Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  4043. enum { uppForEachDNodeAccessControlProcInfo = 0x0000FFD0 };     /* pascal 1_byte Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  4044. enum { uppForEachRecordAccessControlProcInfo = 0x0000FFD0 };     /* pascal 1_byte Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  4045. enum { uppForEachAttributeAccessControlProcInfo = 0x0000FFD0 };  /* pascal 1_byte Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  4046. enum { uppDSAMDirProcInfo = 0x000007E0 };                         /* pascal 2_bytes Func(4_bytes, 4_bytes, 1_byte) */
  4047. enum { uppDSAMDirParseProcInfo = 0x000007E0 };                     /* pascal 2_bytes Func(4_bytes, 4_bytes, 1_byte) */
  4048. enum { uppDSAMAuthProcInfo = 0x000007E0 };                         /* pascal 2_bytes Func(4_bytes, 4_bytes, 1_byte) */
  4049. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  4050.     #pragma parameter CallAuthIOCompletionProc(__A1, __A0)
  4051.     void CallAuthIOCompletionProc(AuthIOCompletionUPP routine, AuthParamBlockPtr paramBlock) = 0x4E91;
  4052. #else
  4053.     #define CallAuthIOCompletionProc(userRoutine, paramBlock)     CALL_ONE_PARAMETER_UPP((userRoutine), uppAuthIOCompletionProcInfo, (paramBlock))
  4054. #endif
  4055. #define CallNotificationProc(userRoutine, clientData, callValue, actionValue, identity)  CALL_FOUR_PARAMETER_UPP((userRoutine), uppNotificationProcInfo, (clientData), (callValue), (actionValue), (identity))
  4056. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  4057.     #pragma parameter CallDirIOCompletionProc(__A1, __A0)
  4058.     void CallDirIOCompletionProc(DirIOCompletionUPP routine, DirParamBlockPtr paramBlock) = 0x4E91;
  4059. #else
  4060.     #define CallDirIOCompletionProc(userRoutine, paramBlock)     CALL_ONE_PARAMETER_UPP((userRoutine), uppDirIOCompletionProcInfo, (paramBlock))
  4061. #endif
  4062. #define CallForEachDirEnumSpecProc(userRoutine, clientData, enumSpec)  CALL_TWO_PARAMETER_UPP((userRoutine), uppForEachDirEnumSpecProcInfo, (clientData), (enumSpec))
  4063. #define CallForEachRecordProc(userRoutine, clientData, enumSpec, pRLI)  CALL_THREE_PARAMETER_UPP((userRoutine), uppForEachRecordProcInfo, (clientData), (enumSpec), (pRLI))
  4064. #define CallForEachLookupRecordIDProc(userRoutine, clientData, recordID)  CALL_TWO_PARAMETER_UPP((userRoutine), uppForEachLookupRecordIDProcInfo, (clientData), (recordID))
  4065. #define CallForEachAttrTypeLookupProc(userRoutine, clientData, attrType, myAttrAccMask)  CALL_THREE_PARAMETER_UPP((userRoutine), uppForEachAttrTypeLookupProcInfo, (clientData), (attrType), (myAttrAccMask))
  4066. #define CallForEachAttrValueProc(userRoutine, clientData, attribute)  CALL_TWO_PARAMETER_UPP((userRoutine), uppForEachAttrValueProcInfo, (clientData), (attribute))
  4067. #define CallForEachAttrTypeProc(userRoutine, clientData, attrType)  CALL_TWO_PARAMETER_UPP((userRoutine), uppForEachAttrTypeProcInfo, (clientData), (attrType))
  4068. #define CallForEachRecordIDProc(userRoutine, clientData, recordID)  CALL_TWO_PARAMETER_UPP((userRoutine), uppForEachRecordIDProcInfo, (clientData), (recordID))
  4069. #define CallForEachDirectoryProc(userRoutine, clientData, dirName, discriminator, features)  CALL_FOUR_PARAMETER_UPP((userRoutine), uppForEachDirectoryProcInfo, (clientData), (dirName), (discriminator), (features))
  4070. #define CallForEachADAPDirectoryProc(userRoutine, clientData, dirName, discriminator, features, serverHint)  CALL_FIVE_PARAMETER_UPP((userRoutine), uppForEachADAPDirectoryProcInfo, (clientData), (dirName), (discriminator), (features), (serverHint))
  4071. #define CallForEachDNodeAccessControlProc(userRoutine, clientData, dsObj, activeDnodeAccMask, defaultRecordAccMask, defaultAttributeAccMask)  CALL_FIVE_PARAMETER_UPP((userRoutine), uppForEachDNodeAccessControlProcInfo, (clientData), (dsObj), (activeDnodeAccMask), (defaultRecordAccMask), (defaultAttributeAccMask))
  4072. #define CallForEachRecordAccessControlProc(userRoutine, clientData, dsObj, activeDnodeAccMask, activeRecordAccMask, defaultAttributeAccMask)  CALL_FIVE_PARAMETER_UPP((userRoutine), uppForEachRecordAccessControlProcInfo, (clientData), (dsObj), (activeDnodeAccMask), (activeRecordAccMask), (defaultAttributeAccMask))
  4073. #define CallForEachAttributeAccessControlProc(userRoutine, clientData, dsObj, activeDnodeAccMask, activeRecordAccMask, activeAttributeAccMask)  CALL_FIVE_PARAMETER_UPP((userRoutine), uppForEachAttributeAccessControlProcInfo, (clientData), (dsObj), (activeDnodeAccMask), (activeRecordAccMask), (activeAttributeAccMask))
  4074. #define CallDSAMDirProc(userRoutine, dsamData, paramBlock, async)  CALL_THREE_PARAMETER_UPP((userRoutine), uppDSAMDirProcInfo, (dsamData), (paramBlock), (async))
  4075. #define CallDSAMDirParseProc(userRoutine, dsamData, paramBlock, async)  CALL_THREE_PARAMETER_UPP((userRoutine), uppDSAMDirParseProcInfo, (dsamData), (paramBlock), (async))
  4076. #define CallDSAMAuthProc(userRoutine, dsamData, pb, async)         CALL_THREE_PARAMETER_UPP((userRoutine), uppDSAMAuthProcInfo, (dsamData), (pb), (async))
  4077. #define NewAuthIOCompletionProc(userRoutine)                     (AuthIOCompletionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppAuthIOCompletionProcInfo, GetCurrentArchitecture())
  4078. #define NewNotificationProc(userRoutine)                         (NotificationUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppNotificationProcInfo, GetCurrentArchitecture())
  4079. #define NewDirIOCompletionProc(userRoutine)                     (DirIOCompletionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDirIOCompletionProcInfo, GetCurrentArchitecture())
  4080. #define NewForEachDirEnumSpecProc(userRoutine)                     (ForEachDirEnumSpecUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachDirEnumSpecProcInfo, GetCurrentArchitecture())
  4081. #define NewForEachRecordProc(userRoutine)                         (ForEachRecordUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachRecordProcInfo, GetCurrentArchitecture())
  4082. #define NewForEachLookupRecordIDProc(userRoutine)                 (ForEachLookupRecordIDUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachLookupRecordIDProcInfo, GetCurrentArchitecture())
  4083. #define NewForEachAttrTypeLookupProc(userRoutine)                 (ForEachAttrTypeLookupUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachAttrTypeLookupProcInfo, GetCurrentArchitecture())
  4084. #define NewForEachAttrValueProc(userRoutine)                     (ForEachAttrValueUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachAttrValueProcInfo, GetCurrentArchitecture())
  4085. #define NewForEachAttrTypeProc(userRoutine)                     (ForEachAttrTypeUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachAttrTypeProcInfo, GetCurrentArchitecture())
  4086. #define NewForEachRecordIDProc(userRoutine)                     (ForEachRecordIDUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachRecordIDProcInfo, GetCurrentArchitecture())
  4087. #define NewForEachDirectoryProc(userRoutine)                     (ForEachDirectoryUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachDirectoryProcInfo, GetCurrentArchitecture())
  4088. #define NewForEachADAPDirectoryProc(userRoutine)                 (ForEachADAPDirectoryUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachADAPDirectoryProcInfo, GetCurrentArchitecture())
  4089. #define NewForEachDNodeAccessControlProc(userRoutine)             (ForEachDNodeAccessControlUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachDNodeAccessControlProcInfo, GetCurrentArchitecture())
  4090. #define NewForEachRecordAccessControlProc(userRoutine)             (ForEachRecordAccessControlUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachRecordAccessControlProcInfo, GetCurrentArchitecture())
  4091. #define NewForEachAttributeAccessControlProc(userRoutine)         (ForEachAttributeAccessControlUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachAttributeAccessControlProcInfo, GetCurrentArchitecture())
  4092. #define NewDSAMDirProc(userRoutine)                             (DSAMDirUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDSAMDirProcInfo, GetCurrentArchitecture())
  4093. #define NewDSAMDirParseProc(userRoutine)                         (DSAMDirParseUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDSAMDirParseProcInfo, GetCurrentArchitecture())
  4094. #define NewDSAMAuthProc(userRoutine)                             (DSAMAuthUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDSAMAuthProcInfo, GetCurrentArchitecture())
  4095. EXTERN_API( OSErr )
  4096. AuthBindSpecificIdentity        (AuthParamBlockPtr         paramBlock,
  4097.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0200, 0xAA5E);
  4098.  
  4099. EXTERN_API( OSErr )
  4100. AuthUnbindSpecificIdentity        (AuthParamBlockPtr         paramBlock,
  4101.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0201, 0xAA5E);
  4102.  
  4103. EXTERN_API( OSErr )
  4104. AuthResolveCreationID            (AuthParamBlockPtr         paramBlock,
  4105.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0202, 0xAA5E);
  4106.  
  4107. EXTERN_API( OSErr )
  4108. AuthGetSpecificIdentityInfo        (AuthParamBlockPtr         paramBlock,
  4109.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0203, 0xAA5E);
  4110.  
  4111. EXTERN_API( OSErr )
  4112. AuthAddKey                        (AuthParamBlockPtr         paramBlock,
  4113.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0207, 0xAA5E);
  4114.  
  4115. EXTERN_API( OSErr )
  4116. AuthChangeKey                    (AuthParamBlockPtr         paramBlock,
  4117.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0208, 0xAA5E);
  4118.  
  4119. EXTERN_API( OSErr )
  4120. AuthDeleteKey                    (AuthParamBlockPtr         paramBlock,
  4121.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0209, 0xAA5E);
  4122.  
  4123. EXTERN_API( OSErr )
  4124. AuthPasswordToKey                (AuthParamBlockPtr         paramBlock,
  4125.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x020A, 0xAA5E);
  4126.  
  4127. EXTERN_API( OSErr )
  4128. AuthGetCredentials                (AuthParamBlockPtr         paramBlock,
  4129.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x020B, 0xAA5E);
  4130.  
  4131. EXTERN_API( OSErr )
  4132. AuthDecryptCredentials            (AuthParamBlockPtr         paramBlock,
  4133.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x020C, 0xAA5E);
  4134.  
  4135. EXTERN_API( OSErr )
  4136. AuthMakeChallenge                (AuthParamBlockPtr         paramBlock,
  4137.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x020F, 0xAA5E);
  4138.  
  4139. EXTERN_API( OSErr )
  4140. AuthMakeReply                    (AuthParamBlockPtr         paramBlock,
  4141.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0210, 0xAA5E);
  4142.  
  4143. EXTERN_API( OSErr )
  4144. AuthVerifyReply                    (AuthParamBlockPtr         paramBlock,
  4145.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0211, 0xAA5E);
  4146.  
  4147. EXTERN_API( OSErr )
  4148. AuthGetUTCTime                    (AuthParamBlockPtr         paramBlock,
  4149.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x021A, 0xAA5E);
  4150.  
  4151. EXTERN_API( OSErr )
  4152. AuthMakeProxy                    (AuthParamBlockPtr         paramBlock,
  4153.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0212, 0xAA5E);
  4154.  
  4155. EXTERN_API( OSErr )
  4156. AuthTradeProxyForCredentials    (AuthParamBlockPtr         paramBlock,
  4157.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0213, 0xAA5E);
  4158.  
  4159. /* Local Identity API */
  4160. EXTERN_API( OSErr )
  4161. AuthGetLocalIdentity            (AuthParamBlockPtr         paramBlock,
  4162.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0204, 0xAA5E);
  4163.  
  4164. EXTERN_API( OSErr )
  4165. AuthUnlockLocalIdentity            (AuthParamBlockPtr         paramBlock,
  4166.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0214, 0xAA5E);
  4167.  
  4168. EXTERN_API( OSErr )
  4169. AuthLockLocalIdentity            (AuthParamBlockPtr         paramBlock,
  4170.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0215, 0xAA5E);
  4171.  
  4172. EXTERN_API( OSErr )
  4173. AuthAddToLocalIdentityQueue        (AuthParamBlockPtr         paramBlock,
  4174.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0205, 0xAA5E);
  4175.  
  4176. EXTERN_API( OSErr )
  4177. AuthRemoveFromLocalIdentityQueue (AuthParamBlockPtr     paramBlock,
  4178.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0206, 0xAA5E);
  4179.  
  4180. EXTERN_API( OSErr )
  4181. AuthSetupLocalIdentity            (AuthParamBlockPtr         paramBlock,
  4182.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0216, 0xAA5E);
  4183.  
  4184. EXTERN_API( OSErr )
  4185. AuthChangeLocalIdentity            (AuthParamBlockPtr         paramBlock,
  4186.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0217, 0xAA5E);
  4187.  
  4188. EXTERN_API( OSErr )
  4189. AuthRemoveLocalIdentity            (AuthParamBlockPtr         paramBlock,
  4190.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0218, 0xAA5E);
  4191.  
  4192. EXTERN_API( OSErr )
  4193. DirAddRecord                    (DirParamBlockPtr         paramBlock,
  4194.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0109, 0xAA5E);
  4195.  
  4196. EXTERN_API( OSErr )
  4197. DirDeleteRecord                    (DirParamBlockPtr         paramBlock,
  4198.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x010A, 0xAA5E);
  4199.  
  4200. EXTERN_API( OSErr )
  4201. DirEnumerateGet                    (DirParamBlockPtr         paramBlock,
  4202.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0111, 0xAA5E);
  4203.  
  4204. EXTERN_API( OSErr )
  4205. DirEnumerateParse                (DirParamBlockPtr         paramBlock,
  4206.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0101, 0xAA5E);
  4207.  
  4208. EXTERN_API( OSErr )
  4209. DirFindRecordGet                (DirParamBlockPtr         paramBlock,
  4210.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0140, 0xAA5E);
  4211.  
  4212. EXTERN_API( OSErr )
  4213. DirFindRecordParse                (DirParamBlockPtr         paramBlock,
  4214.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0141, 0xAA5E);
  4215.  
  4216. EXTERN_API( OSErr )
  4217. DirLookupGet                    (DirParamBlockPtr         paramBlock,
  4218.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0117, 0xAA5E);
  4219.  
  4220. EXTERN_API( OSErr )
  4221. DirLookupParse                    (DirParamBlockPtr         paramBlock,
  4222.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0102, 0xAA5E);
  4223.  
  4224. EXTERN_API( OSErr )
  4225. DirAddAttributeValue            (DirParamBlockPtr         paramBlock,
  4226.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x010B, 0xAA5E);
  4227.  
  4228. EXTERN_API( OSErr )
  4229. DirDeleteAttributeValue            (DirParamBlockPtr         paramBlock,
  4230.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x010C, 0xAA5E);
  4231.  
  4232. EXTERN_API( OSErr )
  4233. DirDeleteAttributeType            (DirParamBlockPtr         paramBlock,
  4234.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0130, 0xAA5E);
  4235.  
  4236. EXTERN_API( OSErr )
  4237. DirChangeAttributeValue            (DirParamBlockPtr         paramBlock,
  4238.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x010D, 0xAA5E);
  4239.  
  4240. EXTERN_API( OSErr )
  4241. DirVerifyAttributeValue            (DirParamBlockPtr         paramBlock,
  4242.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x010E, 0xAA5E);
  4243.  
  4244. EXTERN_API( OSErr )
  4245. DirFindValue                    (DirParamBlockPtr         paramBlock,
  4246.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0126, 0xAA5E);
  4247.  
  4248. EXTERN_API( OSErr )
  4249. DirEnumerateAttributeTypesGet    (DirParamBlockPtr         paramBlock,
  4250.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0112, 0xAA5E);
  4251.  
  4252. EXTERN_API( OSErr )
  4253. DirEnumerateAttributeTypesParse    (DirParamBlockPtr         paramBlock,
  4254.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0103, 0xAA5E);
  4255.  
  4256. EXTERN_API( OSErr )
  4257. DirAddPseudonym                    (DirParamBlockPtr         paramBlock,
  4258.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x010F, 0xAA5E);
  4259.  
  4260. EXTERN_API( OSErr )
  4261. DirDeletePseudonym                (DirParamBlockPtr         paramBlock,
  4262.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0110, 0xAA5E);
  4263.  
  4264. EXTERN_API( OSErr )
  4265. DirAddAlias                        (DirParamBlockPtr         paramBlock,
  4266.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x011C, 0xAA5E);
  4267.  
  4268. EXTERN_API( OSErr )
  4269. DirEnumeratePseudonymGet        (DirParamBlockPtr         paramBlock,
  4270.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0113, 0xAA5E);
  4271.  
  4272. EXTERN_API( OSErr )
  4273. DirEnumeratePseudonymParse        (DirParamBlockPtr         paramBlock,
  4274.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0104, 0xAA5E);
  4275.  
  4276. EXTERN_API( OSErr )
  4277. DirGetNameAndType                (DirParamBlockPtr         paramBlock,
  4278.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0114, 0xAA5E);
  4279.  
  4280. EXTERN_API( OSErr )
  4281. DirSetNameAndType                (DirParamBlockPtr         paramBlock,
  4282.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0115, 0xAA5E);
  4283.  
  4284. EXTERN_API( OSErr )
  4285. DirGetRecordMetaInfo            (DirParamBlockPtr         paramBlock,
  4286.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0116, 0xAA5E);
  4287.  
  4288. EXTERN_API( OSErr )
  4289. DirGetDNodeMetaInfo                (DirParamBlockPtr         paramBlock,
  4290.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0118, 0xAA5E);
  4291.  
  4292. EXTERN_API( OSErr )
  4293. DirGetDirectoryInfo                (DirParamBlockPtr         paramBlock,
  4294.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0119, 0xAA5E);
  4295.  
  4296. EXTERN_API( OSErr )
  4297. DirGetDNodeAccessControlGet        (DirParamBlockPtr         paramBlock,
  4298.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x012A, 0xAA5E);
  4299.  
  4300. EXTERN_API( OSErr )
  4301. DirGetDNodeAccessControlParse    (DirParamBlockPtr         paramBlock,
  4302.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x012F, 0xAA5E);
  4303.  
  4304. EXTERN_API( OSErr )
  4305. DirGetRecordAccessControlGet    (DirParamBlockPtr         paramBlock,
  4306.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x012C, 0xAA5E);
  4307.  
  4308. EXTERN_API( OSErr )
  4309. DirGetRecordAccessControlParse    (DirParamBlockPtr         paramBlock,
  4310.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0134, 0xAA5E);
  4311.  
  4312. EXTERN_API( OSErr )
  4313. DirGetAttributeAccessControlGet    (DirParamBlockPtr         paramBlock,
  4314.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x012E, 0xAA5E);
  4315.  
  4316. EXTERN_API( OSErr )
  4317. DirGetAttributeAccessControlParse (DirParamBlockPtr     paramBlock,
  4318.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0138, 0xAA5E);
  4319.  
  4320. EXTERN_API( OSErr )
  4321. DirEnumerateDirectoriesGet        (DirParamBlockPtr         paramBlock,
  4322.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x011A, 0xAA5E);
  4323.  
  4324. EXTERN_API( OSErr )
  4325. DirEnumerateDirectoriesParse    (DirParamBlockPtr         paramBlock,
  4326.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0106, 0xAA5E);
  4327.  
  4328. EXTERN_API( OSErr )
  4329. DirMapPathNameToDNodeNumber        (DirParamBlockPtr         paramBlock,
  4330.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0122, 0xAA5E);
  4331.  
  4332. EXTERN_API( OSErr )
  4333. DirMapDNodeNumberToPathName        (DirParamBlockPtr         paramBlock,
  4334.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0123, 0xAA5E);
  4335.  
  4336.  
  4337. EXTERN_API( OSErr )
  4338. DirGetLocalNetworkSpec            (DirParamBlockPtr         paramBlock,
  4339.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0124, 0xAA5E);
  4340.  
  4341. EXTERN_API( OSErr )
  4342. DirGetDNodeInfo                    (DirParamBlockPtr         paramBlock,
  4343.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0125, 0xAA5E);
  4344.  
  4345.  
  4346. /*  Trap Dispatchers for Personal Catalog and CSAM Extensions */
  4347. EXTERN_API( OSErr )
  4348. DirCreatePersonalDirectory        (DirParamBlockPtr         paramBlock)                            FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x011F, 0xAA5E);
  4349.  
  4350. EXTERN_API( OSErr )
  4351. DirOpenPersonalDirectory        (DirParamBlockPtr         paramBlock)                            FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x011E, 0xAA5E);
  4352.  
  4353. EXTERN_API( OSErr )
  4354. DirClosePersonalDirectory        (DirParamBlockPtr         paramBlock)                            FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x0131, 0xAA5E);
  4355.  
  4356. EXTERN_API( OSErr )
  4357. DirMakePersonalDirectoryRLI        (DirParamBlockPtr         paramBlock)                            FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x0132, 0xAA5E);
  4358.  
  4359. EXTERN_API( OSErr )
  4360. DirAddDSAM                        (DirParamBlockPtr         paramBlock)                            FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x011D, 0xAA5E);
  4361.  
  4362. EXTERN_API( OSErr )
  4363. DirInstantiateDSAM                (DirParamBlockPtr         paramBlock)                            FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x0127, 0xAA5E);
  4364.  
  4365.  
  4366. EXTERN_API( OSErr )
  4367. DirRemoveDSAM                    (DirParamBlockPtr         paramBlock)                            FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x0120, 0xAA5E);
  4368.  
  4369. EXTERN_API( OSErr )
  4370. DirAddDSAMDirectory                (DirParamBlockPtr         paramBlock,
  4371.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0133, 0xAA5E);
  4372.  
  4373. EXTERN_API( OSErr )
  4374. DirGetExtendedDirectoriesInfo    (DirParamBlockPtr         paramBlock,
  4375.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0136, 0xAA5E);
  4376.  
  4377. EXTERN_API( OSErr )
  4378. DirGetDirectoryIcon                (DirParamBlockPtr         paramBlock,
  4379.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0121, 0xAA5E);
  4380.  
  4381.  
  4382. EXTERN_API( OSErr )
  4383. DirAddADAPDirectory                (DirParamBlockPtr         paramBlock,
  4384.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0137, 0xAA5E);
  4385.  
  4386. EXTERN_API( OSErr )
  4387. DirRemoveDirectory                (DirParamBlockPtr         paramBlock,
  4388.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0135, 0xAA5E);
  4389.  
  4390. EXTERN_API( OSErr )
  4391. DirNetSearchADAPDirectoriesGet    (DirParamBlockPtr         paramBlock,
  4392.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0108, 0xAA5E);
  4393.  
  4394. EXTERN_API( OSErr )
  4395. DirNetSearchADAPDirectoriesParse (DirParamBlockPtr         paramBlock,
  4396.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0105, 0xAA5E);
  4397.  
  4398. EXTERN_API( OSErr )
  4399. DirFindADAPDirectoryByNetSearch    (DirParamBlockPtr         paramBlock,
  4400.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0107, 0xAA5E);
  4401.  
  4402. EXTERN_API( OSErr )
  4403. DirGetOCESetupRefNum            (DirParamBlockPtr         paramBlock,
  4404.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0128, 0xAA5E);
  4405.  
  4406. EXTERN_API( OSErr )
  4407. DirAbort                        (DirParamBlockPtr         paramBlock)                            FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x011B, 0xAA5E);
  4408.  
  4409. EXTERN_API( OSErr )
  4410. OCESetupAddDirectoryInfo        (AuthParamBlockPtr         paramBlock,
  4411.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0219, 0xAA5E);
  4412.  
  4413. EXTERN_API( OSErr )
  4414. OCESetupChangeDirectoryInfo        (AuthParamBlockPtr         paramBlock,
  4415.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x021B, 0xAA5E);
  4416.  
  4417. EXTERN_API( OSErr )
  4418. OCESetupRemoveDirectoryInfo        (AuthParamBlockPtr         paramBlock,
  4419.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x020D, 0xAA5E);
  4420.  
  4421. EXTERN_API( OSErr )
  4422. OCESetupGetDirectoryInfo        (AuthParamBlockPtr         paramBlock,
  4423.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x020E, 0xAA5E);
  4424.  
  4425.  
  4426. #if PRAGMA_STRUCT_ALIGN
  4427.     #pragma options align=reset
  4428. #elif PRAGMA_STRUCT_PACKPUSH
  4429.     #pragma pack(pop)
  4430. #elif PRAGMA_STRUCT_PACK
  4431.     #pragma pack()
  4432. #endif
  4433.  
  4434. #ifdef PRAGMA_IMPORT_OFF
  4435. #pragma import off
  4436. #elif PRAGMA_IMPORT
  4437. #pragma import reset
  4438. #endif
  4439.  
  4440. #ifdef __cplusplus
  4441. }
  4442. #endif
  4443.  
  4444. #endif /* __OCEAUTHDIR__ */
  4445.  
  4446.